Add test for == function

This commit is contained in:
Laria 2022-11-04 21:51:31 +01:00
parent 369a94cbca
commit 0682b5464d
2 changed files with 41 additions and 0 deletions

View file

@ -65,6 +65,7 @@ functionaltest("not")
functionaltest("type")
functionaltest("if")
functionaltest("while")
functionaltest("eq")
install(TARGETS apfl DESTINATION lib)
install(TARGETS apfl-bin DESTINATION bin)

View file

@ -0,0 +1,40 @@
===== script =====
print (== 1 1)
print (== 1 1 1)
print (== 1 2)
print (== 1 1 2)
print (== nil false)
print (== false false)
print (== true false)
print (== [] [])
print (== [1] [])
print (== [1] [2])
print (== [1] [1])
print (== [[1]] [[1]])
print (== "Hello" 'Hello)
print (== "Hello" 'World)
print (== ['foo -> [1 2 3]] ['foo -> [1 2 3]])
print (== ['foo -> [1 2 3]] ['foo -> [1 2 4]])
print (== {x -> * x 2} {x -> * x 2})
f = {x -> * x 2}
print (== f f)
===== output =====
true
true
false
false
false
true
false
true
false
false
true
true
true
false
true
false
false
true