Add --no-add-history flag
Flag prevents the input stream from saving terms to ~/.scryer_history when set. Use the flag when running tests to increase test isolation.
This commit is contained in:
16
src/machine/args.rs
Normal file
16
src/machine/args.rs
Normal file
@@ -0,0 +1,16 @@
|
||||
use std::collections::BTreeSet;
|
||||
use std::env;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct MachineArgs {
|
||||
pub add_history: bool,
|
||||
}
|
||||
|
||||
impl MachineArgs {
|
||||
pub fn new() -> Self {
|
||||
let args: BTreeSet<String> = env::args().collect();
|
||||
Self {
|
||||
add_history: !args.contains("--no-add-history"),
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user