mirror of
https://github.com/roc-lang/roc.git
synced 2024-09-20 15:27:45 +03:00
try to use legacy linker on static-site-gen in example tests
This commit is contained in:
parent
63bc153025
commit
f1cb7d735b
@ -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",
|
||||
|
2
examples/static-site-gen/.gitignore
vendored
2
examples/static-site-gen/.gitignore
vendored
@ -1,2 +1,2 @@
|
||||
/output
|
||||
/app
|
||||
/static-site
|
||||
|
@ -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
|
Loading…
Reference in New Issue
Block a user