This commit is contained in:
Richard Feldman 2022-06-15 09:06:36 -04:00 committed by Folkert
parent 0d59429061
commit cc94fdd88f
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
2 changed files with 32 additions and 2 deletions

View file

@ -1,8 +1,8 @@
use roc_build::link::LinkType;
use roc_cli::build::check_file;
use roc_cli::{
build_app, format, BuildConfig, FormatMode, Target, CMD_BUILD, CMD_CHECK, CMD_DOCS, CMD_EDIT,
CMD_FORMAT, CMD_REPL, CMD_RUN, CMD_VERSION, DIRECTORY_OR_FILES, FLAG_CHECK, FLAG_LIB,
build_app, format, test, BuildConfig, FormatMode, Target, CMD_BUILD, CMD_CHECK, CMD_DOCS,
CMD_EDIT, CMD_FORMAT, CMD_REPL, CMD_RUN, CMD_VERSION, DIRECTORY_OR_FILES, FLAG_CHECK, FLAG_LIB,
FLAG_NO_LINK, FLAG_TARGET, FLAG_TIME, ROC_FILE,
};
use roc_docs::generate_docs_html;
@ -55,6 +55,15 @@ fn main() -> io::Result<()> {
Ok(1)
}
}
Some((CMD_TEST, matches)) => {
if matches.is_present(ROC_FILE) {
test(Triple::host())
} else {
eprintln!("What .roc file do you want to test? Specify it at the end of the `roc test` command.");
Ok(1)
}
}
Some((CMD_BUILD, matches)) => {
let target: Target = matches.value_of_t(FLAG_TARGET).unwrap_or_default();