Combine integration tests into single binary (#679)

Combine all integration test binaries into a single binary with the root
in `tests/lib.rs`. This also turns of automatic test discovery, so
when adding another set of integration tests, a mod statement will need
to be added to `tests/lib.rs`.
This commit is contained in:
Casey Rodarmor 2020-09-17 17:59:46 -07:00 committed by GitHub
parent c62ff5a3d0
commit 55985aa242
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 8 deletions

View File

@ -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"

View File

@ -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

12
tests/lib.rs Normal file
View File

@ -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;