Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dorota Czaplejewicz
squeekboard
Commits
cfa66d81
Commit
cfa66d81
authored
Dec 14, 2019
by
Mark Müller
Committed by
Dorota Czaplejewicz
Dec 14, 2019
Browse files
squeekboard-test-layout: add argument parsing and some more output
parent
b6e67256
Changes
3
Hide whitespace changes
Inline
Side-by-side
Cargo.toml
View file @
cfa66d81
...
...
@@ -4,6 +4,7 @@ version = "0.1.0"
[dependencies]
bitflags
=
"1.0.*"
clap
=
"2.32.*"
maplit
=
"1.0.*"
regex
=
"1.1.*"
serde
=
{
version
=
"1.0.*"
,
features
=
["derive"]
}
...
...
debian/control
View file @
cfa66d81
...
...
@@ -12,6 +12,7 @@ Build-Depends:
libgtk-3-dev,
libcroco3-dev,
librust-bitflags-1-dev (>= 1.0),
librust-clap-2+default-dev (>= 2.32),
librust-gio+v2-44-dev,
librust-glib+v2-44-dev,
librust-glib-sys-dev,
...
...
src/bin/test_layout.rs
View file @
cfa66d81
#[macro_use]
extern
crate
clap
;
extern
crate
rs
;
use
rs
::
tests
::
check_layout_file
;
use
std
::
env
;
fn
main
()
->
()
{
check_layout_file
(
env
::
args
()
.nth
(
1
)
.expect
(
"No argument given"
)
.as_str
());
let
matches
=
clap_app!
(
test_layout
=>
(
name
:
"squeekboard-test-layout"
)
(
about
:
"Test keyboard layout for errors. Returns OK or an error message containing further information."
)
(
@
arg
INPUT
:
+
required
"Yaml keyboard layout file to test"
)
)
.get_matches
();
if
check_layout_file
(
matches
.value_of
(
"INPUT"
)
.unwrap
())
==
()
{
println!
(
"Test result: OK"
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment