mirror of
https://github.com/Reuh/anselme.git
synced 2025-10-27 16:49:31 +00:00
First test batch and associated fixes
The test runner is also nicer to use.
This commit is contained in:
parent
10084dec23
commit
82ce53be83
154 changed files with 1586 additions and 78 deletions
11
test/tests/binary operator overload.ans
Normal file
11
test/tests/binary operator overload.ans
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
:$ a - b
|
||||
@"generic minus"
|
||||
|
||||
:$ a::string - b::string
|
||||
@a + " minus " + b
|
||||
|
||||
| {2-5}
|
||||
|
||||
| {"heh"-"lol"}
|
||||
|
||||
| {[]-[]}
|
||||
7
test/tests/binop assignement.ans
Normal file
7
test/tests/binop assignement.ans
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
:c = 1
|
||||
|
||||
|{c}
|
||||
|
||||
c += 2
|
||||
|
||||
|{c}
|
||||
11
test/tests/choice block.ans
Normal file
11
test/tests/choice block.ans
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
:@choice = 2
|
||||
| ye |>
|
||||
| no
|
||||
| ne |>
|
||||
| ok
|
||||
|
||||
choice = 1
|
||||
| ho |>
|
||||
| plop
|
||||
| oh |>
|
||||
| plup
|
||||
11
test/tests/choice function.ans
Normal file
11
test/tests/choice function.ans
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
:$ f
|
||||
| neol |>
|
||||
| nah
|
||||
|
||||
| ho |>
|
||||
|plop
|
||||
f!
|
||||
| oh |>
|
||||
|ok
|
||||
f!
|
||||
:@choice=3
|
||||
11
test/tests/choice line interpolation with choice event.ans
Normal file
11
test/tests/choice line interpolation with choice event.ans
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
:@choice=1
|
||||
|
||||
:$ jump button
|
||||
1 # |A
|
||||
| Suprise choice! |> ()
|
||||
@"JOIN"
|
||||
|
||||
| Press {jump button!} to jump. |>
|
||||
|ok
|
||||
| No |>
|
||||
|ko
|
||||
11
test/tests/choice line interpolation with event flush.ans
Normal file
11
test/tests/choice line interpolation with event flush.ans
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
:@choice=1
|
||||
|
||||
:$ jump button
|
||||
1 # | a
|
||||
|
||||
@"SPLIT"
|
||||
|
||||
| Press {jump button!} to jump. |>
|
||||
| ok
|
||||
| No |>
|
||||
| ko
|
||||
17
test/tests/choice line interpolation with text event.ans
Normal file
17
test/tests/choice line interpolation with text event.ans
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
:$ jump button
|
||||
@1 # | A
|
||||
|
||||
:$ move axis
|
||||
1 # | left
|
||||
@" joystick"
|
||||
|
||||
| Press {jump button!} to jump. |>
|
||||
|ok
|
||||
| No |>
|
||||
|ko
|
||||
:@choice = 1
|
||||
|
||||
| Other |>
|
||||
|ok
|
||||
| Use {move axis!} to move. |>
|
||||
|ko
|
||||
16
test/tests/choice preserve tags.ans
Normal file
16
test/tests/choice preserve tags.ans
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
:choice = 1
|
||||
|
||||
:$ f
|
||||
42 #
|
||||
| a |>
|
||||
| b
|
||||
|
||||
f!
|
||||
| c |> ()
|
||||
|
||||
"k":"v" #
|
||||
f!
|
||||
| d |> ()
|
||||
| e
|
||||
|
||||
| f
|
||||
5
test/tests/choice simple.ans
Normal file
5
test/tests/choice simple.ans
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
| ye |>
|
||||
| no
|
||||
| ne |>
|
||||
| ok
|
||||
:@choice = 2
|
||||
12
test/tests/closure.ans
Normal file
12
test/tests/closure.ans
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
:$ f(x)
|
||||
$(y) x + y
|
||||
|
||||
:add two = f(2)
|
||||
|
||||
:add five = f(5)
|
||||
|
||||
|{add two(3)} = 5
|
||||
|{add five(3)} = 8
|
||||
|
||||
|{add two(2)} = 4
|
||||
|{add five(2)} = 7
|
||||
9
test/tests/comment.ans
Normal file
9
test/tests/comment.ans
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
((hey couic + 5))
|
||||
|
||||
((nested ((comments)) d))
|
||||
|
||||
2 ((end of line))
|
||||
|
||||
((start of line)) 3
|
||||
|
||||
5 + ((middle)) 3
|
||||
3
test/tests/condition decorator.ans
Normal file
3
test/tests/condition decorator.ans
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
() ~ |ko
|
||||
1 ~ |ok
|
||||
1 ~ |ok bis
|
||||
6
test/tests/condition else false.ans
Normal file
6
test/tests/condition else false.ans
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
:a = 5
|
||||
|
||||
a == 2 ~
|
||||
|ko
|
||||
~
|
||||
|ok
|
||||
6
test/tests/condition else true.ans
Normal file
6
test/tests/condition else true.ans
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
:a = 5
|
||||
|
||||
a == 5 ~
|
||||
|ok
|
||||
~
|
||||
|ko
|
||||
8
test/tests/condition elseif false.ans
Normal file
8
test/tests/condition elseif false.ans
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
:a = 5
|
||||
|
||||
a == 2 ~
|
||||
|ko
|
||||
~ () ~
|
||||
|ko
|
||||
~
|
||||
|ok
|
||||
8
test/tests/condition elseif true.ans
Normal file
8
test/tests/condition elseif true.ans
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
:a = 5
|
||||
|
||||
a == 2 ~
|
||||
|ko
|
||||
~ 1 ~
|
||||
|ok
|
||||
~
|
||||
|ko
|
||||
4
test/tests/condition false.ans
Normal file
4
test/tests/condition false.ans
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
:a = 5
|
||||
|
||||
a == 2 ~
|
||||
|ko
|
||||
6
test/tests/condition operator.ans
Normal file
6
test/tests/condition operator.ans
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
:$ f
|
||||
@|b
|
||||
|
||||
|a {5 ~ f!} c
|
||||
|
||||
|a {() ~ f!} c
|
||||
4
test/tests/condition true.ans
Normal file
4
test/tests/condition true.ans
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
:a = 5
|
||||
|
||||
a == 5 ~
|
||||
|ok
|
||||
7
test/tests/constant variable.ans
Normal file
7
test/tests/constant variable.ans
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
::a = 3
|
||||
|
||||
{a}
|
||||
|
||||
a = 52
|
||||
|
||||
{a}
|
||||
12
test/tests/custom text formatting.ans
Normal file
12
test/tests/custom text formatting.ans
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
:person = "personne"
|
||||
|
||||
:$ format(p::is(person))
|
||||
p = p!value
|
||||
@"Name: {p("name")}\nAge: {p("age")}"
|
||||
|
||||
:$ Person(name, age)
|
||||
@{"name":name, "age":age}!type(person)
|
||||
|
||||
:abject = Person("Darmanin", 38)
|
||||
|
||||
|{abject}
|
||||
4
test/tests/define override function.ans
Normal file
4
test/tests/define override function.ans
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
:$ a
|
||||
()
|
||||
|
||||
:a = 2
|
||||
4
test/tests/define override variable.ans
Normal file
4
test/tests/define override variable.ans
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
:a = 2
|
||||
|
||||
:$ a
|
||||
()
|
||||
5
test/tests/define override.ans
Normal file
5
test/tests/define override.ans
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
:a = 5
|
||||
|
||||
:a = 2
|
||||
|
||||
a: {a}
|
||||
1
test/tests/define.ans
Normal file
1
test/tests/define.ans
Normal file
|
|
@ -0,0 +1 @@
|
|||
:a = 5
|
||||
7
test/tests/flush.ans
Normal file
7
test/tests/flush.ans
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
:@choice = 1
|
||||
| a
|
||||
|
||||
| b |> ()
|
||||
|
||||
| c
|
||||
| d |> ()
|
||||
4
test/tests/function arg.ans
Normal file
4
test/tests/function arg.ans
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
:$ f(a)
|
||||
|{a}
|
||||
|
||||
f("ok")
|
||||
4
test/tests/function args arity check fail.ans
Normal file
4
test/tests/function args arity check fail.ans
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
:$ f(a, b)
|
||||
| {a}{b}
|
||||
|
||||
f("ok")
|
||||
4
test/tests/function args.ans
Normal file
4
test/tests/function args.ans
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
:$ f(a, b)
|
||||
| {a}{b}
|
||||
|
||||
f("o", "k")
|
||||
22
test/tests/function assignement.ans
Normal file
22
test/tests/function assignement.ans
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
:a = 5
|
||||
|
||||
:$ f(p)
|
||||
@a
|
||||
|
||||
:$ f(p) = v
|
||||
|v={v}
|
||||
a = v
|
||||
|
||||
:$ f(p) = v::string
|
||||
|v2={v}
|
||||
a = p
|
||||
|
||||
|{f(a)}
|
||||
|
||||
f(3) = 50
|
||||
|
||||
|{f(a)}
|
||||
|
||||
f(3) = "ok"
|
||||
|
||||
|{f(a)}
|
||||
21
test/tests/function definition.ans
Normal file
21
test/tests/function definition.ans
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
:f = $(x)x*x
|
||||
|
||||
:$g(x)
|
||||
@x*x
|
||||
|
||||
|{f(5)} = {g(5)}
|
||||
|
||||
|{f(2)} = {g(2)}
|
||||
|
||||
:y = 5
|
||||
:h = $(x)x*x+y
|
||||
|
||||
| {h(3)} == 14
|
||||
|
||||
y = 7
|
||||
|
||||
| {h(5)} == 32
|
||||
|
||||
:i = $y*y
|
||||
|
||||
| {i!} == 49
|
||||
9
test/tests/function name dispatch.ans
Normal file
9
test/tests/function name dispatch.ans
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
:$ fn(x)
|
||||
|x
|
||||
|
||||
:$ fn(a)
|
||||
|a
|
||||
|
||||
fn(a=5)
|
||||
|
||||
fn(x=5)
|
||||
8
test/tests/function no conflict.ans
Normal file
8
test/tests/function no conflict.ans
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
:$ f(a, b)
|
||||
()
|
||||
|
||||
:$ f(x)
|
||||
()
|
||||
|
||||
:$ f(u, v)
|
||||
()
|
||||
6
test/tests/function return exit function.ans
Normal file
6
test/tests/function return exit function.ans
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
:$ hey
|
||||
@5
|
||||
|a
|
||||
@2
|
||||
|
||||
|{hey!}
|
||||
4
test/tests/function return.ans
Normal file
4
test/tests/function return.ans
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
:$ hey
|
||||
@5
|
||||
|
||||
|{hey!}
|
||||
4
test/tests/function scope wrong.ans
Normal file
4
test/tests/function scope wrong.ans
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
:$ a
|
||||
:b = 5
|
||||
|
||||
| a: {b}
|
||||
4
test/tests/function scope.ans
Normal file
4
test/tests/function scope.ans
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
:$ a
|
||||
:@b = 5
|
||||
|
||||
|a: {a.b}
|
||||
12
test/tests/function selection.ans
Normal file
12
test/tests/function selection.ans
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
:$ a(x::number)
|
||||
@x + 2
|
||||
|
||||
:$ x
|
||||
:$ a(x::string)
|
||||
@x + "heh"
|
||||
|
||||
|{a("plop")}
|
||||
|
||||
|{a(2)}
|
||||
|
||||
x!
|
||||
7
test/tests/function type dispatch ambigous.ans
Normal file
7
test/tests/function type dispatch ambigous.ans
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
:$ fn(x::number)
|
||||
|x
|
||||
|
||||
:$ fn(a::number)
|
||||
|a
|
||||
|
||||
fn(5)
|
||||
9
test/tests/function type dispatch.ans
Normal file
9
test/tests/function type dispatch.ans
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
:$ fn(x::number)
|
||||
|x
|
||||
|
||||
:$ fn(a::string)
|
||||
|a
|
||||
|
||||
fn("s")
|
||||
|
||||
fn(5)
|
||||
6
test/tests/function ufcs arg.ans
Normal file
6
test/tests/function ufcs arg.ans
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
:$ f(a)
|
||||
|{a}
|
||||
|
||||
"ok"!f
|
||||
|
||||
"ok"!f()
|
||||
4
test/tests/function ufcs args.ans
Normal file
4
test/tests/function ufcs args.ans
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
:$ f(a, b)
|
||||
|{a}{b}
|
||||
|
||||
"o"!f("k")
|
||||
9
test/tests/function.ans
Normal file
9
test/tests/function.ans
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
:$ f
|
||||
|ok
|
||||
|
||||
f!
|
||||
|
||||
:g = $
|
||||
|ok2
|
||||
|
||||
g!
|
||||
12
test/tests/implicit multiplication.ans
Normal file
12
test/tests/implicit multiplication.ans
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
:x = 4
|
||||
:pi=3.14
|
||||
|
||||
|{2x} = 8
|
||||
|
||||
|{(2+1)x} = 12
|
||||
|
||||
|{2pi} = 2pi
|
||||
|
||||
|{1/2x} = 0.125
|
||||
|
||||
|{(1/2)x+.1} = 2.1
|
||||
23
test/tests/lazy boolean operators.ans
Normal file
23
test/tests/lazy boolean operators.ans
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
:$ a
|
||||
|a
|
||||
@1
|
||||
|
||||
:$ b
|
||||
|b
|
||||
@()
|
||||
|
||||
|{a! & b!} = a b ()
|
||||
|
||||
|{b! & a!} = b ()
|
||||
|
||||
|{a! & a!} = a a 1
|
||||
|
||||
|{b! & b!} = b ()
|
||||
|
||||
|{a! | b!} = a 1
|
||||
|
||||
|{b! | a!} = b a 1
|
||||
|
||||
|{a! | a!} = a 1
|
||||
|
||||
|{b! | b!} = b b ()
|
||||
21
test/tests/list assignement.ans
Normal file
21
test/tests/list assignement.ans
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
:x = *[1,2]
|
||||
|
||||
|{x}
|
||||
|
||||
x(1) = 3
|
||||
|
||||
|{x}
|
||||
|
||||
x(2) = 5
|
||||
|
||||
|{x}
|
||||
|
||||
x(-1) = 12
|
||||
|
||||
|{x}
|
||||
|
||||
x(3) = 99
|
||||
|
||||
|{x}
|
||||
|
||||
x(5) = 0
|
||||
11
test/tests/list index.ans
Normal file
11
test/tests/list index.ans
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
:x = [1,2,3]
|
||||
|
||||
|{x}
|
||||
|
||||
|{x(1)} == {x(-3)}
|
||||
|
||||
|{x(2)} == {x(-2)}
|
||||
|
||||
|{x(3)} == {x(-1)}
|
||||
|
||||
|{x(-4)}
|
||||
5
test/tests/loop decorator.ans
Normal file
5
test/tests/loop decorator.ans
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
:i = 0
|
||||
|
||||
(i += 1; i <= 10) ~? (| {i}\n)!
|
||||
|
||||
|{i}
|
||||
20
test/tests/map assignement.ans
Normal file
20
test/tests/map assignement.ans
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
:x = *{1,2}
|
||||
|
||||
|{x}
|
||||
|
||||
|{x(1) = 3}
|
||||
|
||||
|{x}
|
||||
|
||||
|{x("foo") = "a"}
|
||||
|
||||
|{x}
|
||||
|
||||
|{x("bar") = "b"}
|
||||
|
||||
|{x}
|
||||
|
||||
|{x("foo") = "c"}
|
||||
|
||||
|{x}
|
||||
|
||||
7
test/tests/map index.ans
Normal file
7
test/tests/map index.ans
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
:t = {"ahah":23,"k":23,12}
|
||||
|
||||
|{t} == \{3=12, ahah=23, k=23}
|
||||
|
||||
|{t(3)} == 12
|
||||
|
||||
|{t("ahah")} == 23
|
||||
4
test/tests/named arguments.ans
Normal file
4
test/tests/named arguments.ans
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
:$ f(a, b, c)
|
||||
@a + b + c
|
||||
|
||||
|{f("a", "b", "c")} = {f(a="a", b="b", c="c")} = {f(c="c", a="a", b="b")}
|
||||
6
test/tests/namespace operator arbitrary expression.ans
Normal file
6
test/tests/namespace operator arbitrary expression.ans
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
:$ f
|
||||
:@x = 5
|
||||
|
||||
:a = f
|
||||
|
||||
|{a.("x")}
|
||||
19
test/tests/nested conditions.ans
Normal file
19
test/tests/nested conditions.ans
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
1 ~
|
||||
|yes
|
||||
() ~
|
||||
|no
|
||||
~
|
||||
|nope
|
||||
1 ~
|
||||
|niet
|
||||
() ~
|
||||
|still no
|
||||
~
|
||||
|nein
|
||||
|
||||
() ~
|
||||
|nah
|
||||
~
|
||||
|ye
|
||||
~
|
||||
|da
|
||||
18
test/tests/nested flush.ans
Normal file
18
test/tests/nested flush.ans
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
1 ~
|
||||
|a
|
||||
|
||||
|b
|
||||
|
||||
1 ~
|
||||
|c
|
||||
|d
|
||||
|
||||
1 ~
|
||||
|e
|
||||
|
||||
| f |> ()
|
||||
:@choice = 1
|
||||
|
||||
1 ~
|
||||
|g
|
||||
| h |> ()
|
||||
4
test/tests/optional arguments.ans
Normal file
4
test/tests/optional arguments.ans
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
:$ f(a, b, c="c")
|
||||
@a + b + c
|
||||
|
||||
|{f("a", "b")} = {f("a", "b", "c")} = {f(b="b", a="a")}
|
||||
5
test/tests/pair operator.ans
Normal file
5
test/tests/pair operator.ans
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
:name = "test"
|
||||
|
||||
|{[name:1, 3:"p", (name):"foo", "ho":"ah", name:name]}
|
||||
|
||||
|{["name":1, 3:"p", name:"foo", "ho":"ah", "name":name]}
|
||||
10
test/tests/return in choice.ans
Normal file
10
test/tests/return in choice.ans
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
:$ f
|
||||
| a |>
|
||||
| x
|
||||
@1
|
||||
| y
|
||||
@2
|
||||
|
||||
f! == 2 ~
|
||||
:@choice = 1
|
||||
| Yes.
|
||||
7
test/tests/string escaping.ans
Normal file
7
test/tests/string escaping.ans
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
|expression {"{"a"}"}
|
||||
|
||||
|quote {"\""}
|
||||
|
||||
|other codes {"\n"} {"\\"} {"\t"} \{braces}
|
||||
|
||||
|{"escaping expressions {"a"+"bc"} and \{stuff} \\ and quotes \""}
|
||||
4
test/tests/tag decorator nested.ans
Normal file
4
test/tests/tag decorator nested.ans
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
1 #
|
||||
|foo
|
||||
1 ~ "b":[1,2] #
|
||||
1 ~ "a":[2,3] # | bar
|
||||
3
test/tests/tag decorator.ans
Normal file
3
test/tests/tag decorator.ans
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
1 #
|
||||
| foo
|
||||
"a":[2,3] # | bar
|
||||
4
test/tests/tag empty.ans
Normal file
4
test/tests/tag empty.ans
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
1 #
|
||||
|foo
|
||||
() #
|
||||
|bar
|
||||
4
test/tests/tag.ans
Normal file
4
test/tests/tag.ans
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
1 #
|
||||
|foo
|
||||
"a":[2,3] #
|
||||
|bar
|
||||
5
test/tests/text block.ans
Normal file
5
test/tests/text block.ans
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
| a
|
||||
| b c
|
||||
|
||||
|a
|
||||
|b c
|
||||
3
test/tests/text break.ans
Normal file
3
test/tests/text break.ans
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
|a
|
||||
|
||||
|b c
|
||||
9
test/tests/text escaping.ans
Normal file
9
test/tests/text escaping.ans
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
|expression \{a}
|
||||
|
||||
|quote \"
|
||||
|
||||
|other codes \n \\ \t
|
||||
|
||||
|decorators \# tag \~ condition \$ fn
|
||||
|
||||
|sub \[text]
|
||||
3
test/tests/text format.ans
Normal file
3
test/tests/text format.ans
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
:a = 5
|
||||
|
||||
|a: {a}
|
||||
16
test/tests/text line interpolation with choice event.ans
Normal file
16
test/tests/text line interpolation with choice event.ans
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
:choice = 1
|
||||
|
||||
:$ jump button
|
||||
1 # | A
|
||||
| Surprise choice! |>
|
||||
| ok
|
||||
|
||||
:$ move axis
|
||||
1 # | left
|
||||
| Surprise choice! |>
|
||||
| ok2
|
||||
@" joystick"
|
||||
|
||||
| Press {jump button!} to jump.
|
||||
|
||||
| Use {move axis!} to move.
|
||||
13
test/tests/text line interpolation with event flush.ans
Normal file
13
test/tests/text line interpolation with event flush.ans
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
:$ jump button
|
||||
1 # | A
|
||||
|
||||
@
|
||||
|
||||
:$ move axis
|
||||
1 # | left
|
||||
|
||||
@" joystick"
|
||||
|
||||
| Press {jump button!} to jump.
|
||||
|
||||
| Use {move axis!} to move.
|
||||
10
test/tests/text line interpolation with text event.ans
Normal file
10
test/tests/text line interpolation with text event.ans
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
:$ jump button
|
||||
@1 # | A
|
||||
|
||||
:$ move axis
|
||||
2 # | left
|
||||
@" joystick"
|
||||
|
||||
| Press {jump button!} to jump.
|
||||
|
||||
| Use {move axis!} to move.
|
||||
1
test/tests/text.ans
Normal file
1
test/tests/text.ans
Normal file
|
|
@ -0,0 +1 @@
|
|||
|a
|
||||
11
test/tests/unary operator overload.ans
Normal file
11
test/tests/unary operator overload.ans
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
:$ -f
|
||||
@"generic minus"
|
||||
|
||||
:$ -f::string
|
||||
@"minus "+f
|
||||
|
||||
|{-5}
|
||||
|
||||
|{-"lol"}
|
||||
|
||||
|{-[]}
|
||||
19
test/tests/while loop else.ans
Normal file
19
test/tests/while loop else.ans
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
:i = 1
|
||||
|
||||
| Start with i={i}:
|
||||
|
||||
i < 5 ~?
|
||||
| {i}
|
||||
|
||||
i += 1
|
||||
~
|
||||
| Loop not ran.
|
||||
|
||||
| Start with i={i}:
|
||||
|
||||
i < 5 ~?
|
||||
| {i}
|
||||
|
||||
i += 1
|
||||
~
|
||||
| Loop not ran.
|
||||
16
test/tests/while loop.ans
Normal file
16
test/tests/while loop.ans
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
:i = 0
|
||||
i <= 10 ~?
|
||||
| {i}
|
||||
|
||||
i += 1
|
||||
|
||||
| return in loop:
|
||||
|
||||
i = 0
|
||||
i <= 10 ~?
|
||||
| {i}
|
||||
|
||||
i == 5 ~
|
||||
@()
|
||||
|
||||
i += 1
|
||||
Loading…
Add table
Add a link
Reference in a new issue