Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combine integration tests into single binary #679

Merged
merged 2 commits into from
Sep 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand Down Expand Up @@ -53,3 +54,7 @@ targets = ["x86_64-unknown-linux-gnu"]

[profile.release]
lto = true

[[test]]
name = "integration"
path = "tests/lib.rs"
10 changes: 2 additions & 8 deletions src/lexer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
12 changes: 12 additions & 0 deletions tests/lib.rs
Original file line number Diff line number Diff line change
@@ -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;
File renamed without changes.