mirror of
https://github.com/casey/just.git
synced 2024-11-23 02:44:56 +03:00
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"
|
||||
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"
|
||||
|
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
|
||||
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
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