Move cli_testing_examples under crates/cli/tests

This commit is contained in:
Jonathan Schear 2024-03-05 12:17:23 -05:00
parent d232a843e4
commit 813b0010b7
No known key found for this signature in database
GPG key ID: 0F4D841667534076
36 changed files with 28 additions and 14 deletions

View file

@ -547,14 +547,14 @@ mod cli_run {
// on the building of the platform // on the building of the platform
test_roc_app( test_roc_app(
"crates/cli_testing_examples/expects", "crates/cli/tests/cli_testing_examples/expects",
"expects.roc", "expects.roc",
&[], &[],
&[], &[],
&[], &[],
indoc!( indoc!(
r#" r#"
EXPECT FAILED in ...roc/roc/crates/cli_testing_examples/expects/expects.roc EXPECT FAILED in tests/cli_testing_examples/expects/expects.roc
This expectation failed: This expectation failed:
@ -580,14 +580,14 @@ mod cli_run {
); );
test_roc_app( test_roc_app(
"crates/cli_testing_examples/expects", "crates/cli/tests/cli_testing_examples/expects",
"expects.roc", "expects.roc",
&[], &[],
&[], &[],
&[], &[],
indoc!( indoc!(
r#" r#"
EXPECT FAILED in ...roc/roc/crates/cli_testing_examples/expects/expects.roc EXPECT FAILED in tests/cli_testing_examples/expects/expects.roc
This expectation failed: This expectation failed:
@ -599,7 +599,7 @@ mod cli_run {
a : Num * a : Num *
a = 1 a = 1
EXPECT FAILED in ...roc/roc/crates/cli_testing_examples/expects/expects.roc EXPECT FAILED in tests/cli_testing_examples/expects/expects.roc
This expectation failed: This expectation failed:
@ -611,7 +611,7 @@ mod cli_run {
a : Num * a : Num *
a = 1 a = 1
EXPECT FAILED in ...roc/roc/crates/cli_testing_examples/expects/expects.roc EXPECT FAILED in tests/cli_testing_examples/expects/expects.roc
This expectation failed: This expectation failed:
@ -659,7 +659,7 @@ mod cli_run {
)] )]
fn fibonacci() { fn fibonacci() {
test_roc_app_slim( test_roc_app_slim(
"crates/cli_testing_examples/algorithms", "crates/cli/tests/cli_testing_examples/algorithms",
"fibonacci.roc", "fibonacci.roc",
"", "",
UseValgrind::Yes, UseValgrind::Yes,
@ -698,7 +698,7 @@ mod cli_run {
#[cfg_attr(windows, ignore)] #[cfg_attr(windows, ignore)]
fn quicksort() { fn quicksort() {
test_roc_app_slim( test_roc_app_slim(
"crates/cli_testing_examples/algorithms", "crates/cli/tests/cli_testing_examples/algorithms",
"quicksort.roc", "quicksort.roc",
"[0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2]\n", "[0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2]\n",
UseValgrind::Yes, UseValgrind::Yes,

File diff suppressed because one or more lines are too long

View file

@ -411,6 +411,8 @@ pub fn cli_testing_dir(dir_name: &str) -> PathBuf {
// Descend into examples/{dir_name} // Descend into examples/{dir_name}
path.push("crates"); path.push("crates");
path.push("cli");
path.push("tests");
path.push("cli_testing_examples"); path.push("cli_testing_examples");
path.extend(dir_name.split('/')); // Make slashes cross-target path.extend(dir_name.split('/')); // Make slashes cross-target