yandere dev moment

This commit is contained in:
nora 2022-01-01 13:51:55 +01:00
parent 4e30201be4
commit 5a11355142
2 changed files with 34 additions and 0 deletions

View file

@ -51,3 +51,30 @@ if false {
}
"#
);
run_test!(
if_else_long_comparison_chain,
r#"
let string = "hi ._./";
if string == "no" {
print "WRONG";
} else if string == "no as well" {
print "WRONG";
} else if string == "wrong" {
print "WRONG";
} else if string == "not the correct one" {
print "WRONG";
} else if string == "hi ._. (wrong)" {
print "WRONG";
} else if string == "" {
print "WRONG";
} else if string == "how wrong should it be?" {
print "WRONG";
} else if string == "hi ._./" {
print "true!";
} else {
print "WRONG";
}
"#
);

View file

@ -0,0 +1,7 @@
---
source: tests/control_flow.rs
assertion_line: 55
expression: output
---
"true!\n"