Skip to content

Commit

Permalink
Fix breaking tests with optional script flag (-s)
Browse files Browse the repository at this point in the history
  • Loading branch information
InnovativeInventor committed Apr 12, 2021
1 parent 5a30f44 commit 72bc9b2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ jobs:
cargo test --verbose
cargo bench --verbose
bash release.sh
time ./target/release/non-attacking-queens -n 8 -m 8
time ./target/release/non-attacking-queens -n 8 -m 8 -s
9 changes: 9 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ struct Opt {
// File to read from
#[structopt(short = "r", long = "read")]
read: Option<String>,

// File to read from
#[structopt(short = "s", long = "non-interactive")]
noninteractive: bool,
}

// The graph is represented by edges with a byte:
Expand Down Expand Up @@ -108,6 +112,11 @@ fn main() {
}

run(& mut state.clone(), opt.clone(), &grid_tracker);

if opt.noninteractive{
break
}

println!("X coord:");
let mut x = String::new();
io::stdin()
Expand Down

0 comments on commit 72bc9b2

Please sign in to comment.