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:
parent
c62ff5a3d0
commit
55985aa242
@ -8,6 +8,7 @@ homepage = "https://github.com/casey/just"
|
|||||||
repository = "https://github.com/casey/just"
|
repository = "https://github.com/casey/just"
|
||||||
readme = "crates-io-readme.md"
|
readme = "crates-io-readme.md"
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
autotests = false
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = []
|
default = []
|
||||||
@ -53,3 +54,7 @@ targets = ["x86_64-unknown-linux-gnu"]
|
|||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
lto = true
|
lto = true
|
||||||
|
|
||||||
|
[[test]]
|
||||||
|
name = "integration"
|
||||||
|
path = "tests/lib.rs"
|
||||||
|
10
src/lexer.rs
10
src/lexer.rs
@ -228,10 +228,7 @@ impl<'src> Lexer<'src> {
|
|||||||
|
|
||||||
/// True if `c` can be the first character of an identifier
|
/// True if `c` can be the first character of an identifier
|
||||||
fn is_identifier_start(c: char) -> bool {
|
fn is_identifier_start(c: char) -> bool {
|
||||||
match c {
|
matches!(c, 'a'..='z' | 'A'..='Z' | '_')
|
||||||
'a'..='z' | 'A'..='Z' | '_' => true,
|
|
||||||
_ => false,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// True if `c` can be a continuation character of an idenitifier
|
/// True if `c` can be a continuation character of an idenitifier
|
||||||
@ -240,10 +237,7 @@ impl<'src> Lexer<'src> {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
match c {
|
matches!(c, '0'..='9' | '-')
|
||||||
'0'..='9' | '-' => true,
|
|
||||||
_ => false,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Consume the text and produce a series of tokens
|
/// Consume the text and produce a series of tokens
|
||||||
|
12
tests/lib.rs
Normal file
12
tests/lib.rs
Normal 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;
|
Loading…
Reference in New Issue
Block a user