Skip to content

Commit

Permalink
feat(review): variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Mte90 committed Jul 26, 2024
1 parent e81b481 commit cf346d9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/tests/stdlib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ fn stdlib_test(input: &str) {
let code = fs::read_to_string(input)
.expect(&format!("Failed to open {input} test file"));

let mut _is_output = false;
let mut is_output = false;
let mut output = "".to_owned();
for line in code.lines() {
if line.starts_with("// Output") {
_is_output = true;
is_output = true;
continue;
} else if line.is_empty() && _is_output {
_is_output = false;
is_output = false;
break;
}

if _is_output {
if !output.is_empty() {
if is_output {
if ! output.is_empty() {
output.push_str("\n");
}
output.push_str(&line.replace("//", "").trim());
Expand Down

0 comments on commit cf346d9

Please sign in to comment.