diff options
| author | liv <liv@fastmail.com> | 2019-01-09 22:04:08 +0100 |
|---|---|---|
| committer | liv <liv@fastmail.com> | 2019-01-09 22:04:08 +0100 |
| commit | 141db7795b23d066a2b7c798d16c96ff53aa5a52 (patch) | |
| tree | 95d475ac48bab300b42c8ccef276f08f44ac5e4e /src/run.rs | |
| parent | 17e12433cbe0174fe93196a43953af95ccb71dae (diff) | |
add --test run flag
Diffstat (limited to 'src/run.rs')
| -rw-r--r-- | src/run.rs | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -1,10 +1,18 @@ use crate::util::clean; +use crate::verify::test; use console::{style, Emoji}; use indicatif::ProgressBar; use std::process::Command; pub fn run(matches: clap::ArgMatches) { if let Some(filename) = matches.value_of("file") { + if matches.is_present("test") { + match test(filename) { + Ok(_) => (), + Err(_) => (), + } + std::process::exit(0); + } let bar = ProgressBar::new_spinner(); bar.set_message(format!("Compiling {}...", filename).as_str()); bar.enable_steady_tick(100); |
