diff --git a/crates/cli/tests/cli_run.rs b/crates/cli/tests/cli_run.rs index 3aef2f34e8..20528a2145 100644 --- a/crates/cli/tests/cli_run.rs +++ b/crates/cli/tests/cli_run.rs @@ -275,6 +275,11 @@ mod cli_run { let example = $example; let file_name = example_file(dir_name, example.filename); + let mut app_args: Vec = vec![]; + for file in example.input_paths { + app_args.push(example_file(dir_name, file).to_str().unwrap().to_string()); + } + match example.executable_filename { "form" | "hello-gui" | "breakout" | "ruby" => { // Since these require things the build system often doesn't have @@ -294,14 +299,13 @@ mod cli_run { eprintln!("WARNING: skipping testing example {} because it only works in a browser!", example.filename); return; } + "static-site" => { + run_roc_on(&file_name, [LINKER_FLAG, "legacy"], &[], &app_args); + return; + } _ => {} } - let mut app_args: Vec = vec![]; - for file in example.input_paths { - app_args.push(example_file(dir_name, file).to_str().unwrap().to_string()); - } - // Check with and without optimizations check_output_with_stdin( &file_name, @@ -534,8 +538,8 @@ mod cli_run { }, static_site_gen: "static-site-gen" => { Example { - filename: "app.roc", - executable_filename: "app", + filename: "static-site.roc", + executable_filename: "static-site", stdin: &[], input_paths: &["input", "output"], expected_ending: "hello.txt -> hello.html\n", diff --git a/examples/static-site-gen/.gitignore b/examples/static-site-gen/.gitignore index 91070d30f2..d3b4580eb5 100644 --- a/examples/static-site-gen/.gitignore +++ b/examples/static-site-gen/.gitignore @@ -1,2 +1,2 @@ /output -/app +/static-site diff --git a/examples/static-site-gen/app.roc b/examples/static-site-gen/static-site.roc similarity index 97% rename from examples/static-site-gen/app.roc rename to examples/static-site-gen/static-site.roc index 8249279cbe..7dedaa226a 100644 --- a/examples/static-site-gen/app.roc +++ b/examples/static-site-gen/static-site.roc @@ -1,4 +1,4 @@ -app "app" +app "static-site" packages { pf: "platform/main.roc" } imports [pf.Html.{ html, head, body, div, text }] provides [transformFileContent] to pf