try to use legacy linker on static-site-gen in example tests

This commit is contained in:
Brian Carroll 2022-08-30 23:57:38 +01:00
parent 63bc153025
commit f1cb7d735b
No known key found for this signature in database
GPG Key ID: 9CF4E3BF9C4722C7
3 changed files with 13 additions and 9 deletions

View File

@ -275,6 +275,11 @@ mod cli_run {
let example = $example;
let file_name = example_file(dir_name, example.filename);
let mut app_args: Vec<String> = 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<String> = 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",

View File

@ -1,2 +1,2 @@
/output
/app
/static-site

View File

@ -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