Created
March 27, 2017 04:51
-
-
Save agentzh/5154642d55a6727c653858849b0698cf to your computer and use it in GitHub Desktop.
tests for fanlang
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use t::FanLang 'no_plan'; | |
#no_diff(); | |
run_tests(); | |
__DATA__ | |
=== TEST 1: hello world | |
--- fan | |
say("hello, world"); | |
--- out | |
hello, world | |
=== TEST 2: simple arithmetic | |
--- fan | |
say(3+5*2); | |
--- out | |
13 | |
=== TEST 3: code block | |
--- fan | |
{ | |
print("hi, "); | |
say(56.4); | |
} | |
--- out | |
hi, 56.4 | |
=== TEST 4: with unary - | |
--- fan | |
say(-32 + 1); | |
--- out | |
-31 | |
=== TEST 5: with unary + | |
--- fan | |
say(+32 + 1); | |
--- out | |
33 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment