diff --git a/Cargo.toml b/Cargo.toml index a2f8f58..8991536 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,6 +8,7 @@ homepage = "https://github.com/casey/just" repository = "https://github.com/casey/just" readme = "crates-io-readme.md" edition = "2018" +autotests = false [features] default = [] @@ -53,3 +54,7 @@ targets = ["x86_64-unknown-linux-gnu"] [profile.release] lto = true + +[[test]] +name = "integration" +path = "tests/lib.rs" diff --git a/src/lexer.rs b/src/lexer.rs index 4141794..c5189f3 100644 --- a/src/lexer.rs +++ b/src/lexer.rs @@ -228,10 +228,7 @@ impl<'src> Lexer<'src> { /// True if `c` can be the first character of an identifier fn is_identifier_start(c: char) -> bool { - match c { - 'a'..='z' | 'A'..='Z' | '_' => true, - _ => false, - } + matches!(c, 'a'..='z' | 'A'..='Z' | '_') } /// True if `c` can be a continuation character of an idenitifier @@ -240,10 +237,7 @@ impl<'src> Lexer<'src> { return true; } - match c { - '0'..='9' | '-' => true, - _ => false, - } + matches!(c, '0'..='9' | '-') } /// Consume the text and produce a series of tokens diff --git a/tests/lib.rs b/tests/lib.rs new file mode 100644 index 0000000..9b57557 --- /dev/null +++ b/tests/lib.rs @@ -0,0 +1,12 @@ +mod completions; +mod dotenv; +mod edit; +mod examples; +mod init; +mod interrupts; +mod invocation_directory; +mod misc; +mod readme; +mod search; +mod shell; +mod working_directory; diff --git a/tests/integration.rs b/tests/misc.rs similarity index 100% rename from tests/integration.rs rename to tests/misc.rs