Add pass-by-reference test (doesn't work yet)

Also rename the "hello_world.able" test to "hello-world.able" for
consistency.
pull/35/head
Alex Bethel 2021-06-13 09:50:18 -05:00
parent 5e0e2b83f9
commit 2dfc0f1470
2 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,17 @@
owo Pass-by-reference test
owo Swap two variables.
functio swap(left, right) {
var tmp = left;
left = right;
right = tmp;
}
var foo = "hello";
var bar = "world";
swap(foo, bar);
owo Should print "hello", then "world"
bar print;
foo print;