Skip to content

Commit

Permalink
feat(test): new solution for output, amber-lang#332
Browse files Browse the repository at this point in the history
  • Loading branch information
Mte90 committed Jul 23, 2024
1 parent bbd1219 commit ada3d55
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/tests/stdlib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ fn stdlib_test(input: &str) {
}

if _is_output {
if ! output.is_empty() {
output.push_str("\n");
}
output.push_str(&line.replace("//", "").trim());
}
}
Expand Down
5 changes: 5 additions & 0 deletions src/tests/stdlib/lines.ab
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import { lines } from "std/text"

// Output
// line: hello
// line: world

main {
loop line in lines("hello\nworld") {
echo "line: " + line
Expand Down
2 changes: 0 additions & 2 deletions src/tests/stdlib/lines.output.txt

This file was deleted.

0 comments on commit ada3d55

Please sign in to comment.