Skip to content

Commit

Permalink
Create firsttest.txt
Browse files Browse the repository at this point in the history
Testing output from emulator
  • Loading branch information
artgreen authored Mar 25, 2023
1 parent 6ab79b0 commit 1df1292
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions firsttest.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
$ iix lua -v
Lua 5.4.4 Copyright (C) 1994-2022 Lua.org, PUC-Rio

$ iix lua luac.out
Starting test

Type tests
Number type == number
String type == string
Boolean type == boolean
Nil type == nil

Arithmetic tests
1.0 + 2.0 == 3.0
1 + 2 == 3
a + b == -3 a=-1,b=-2

Conditional tests
Pass 200 > 100

Loop tests
Basic for loop... passed
Basic for loop with step... passed
Basic for loop with neg step... failed
1 1910
2 1920
3 1930
4 1940
5 1950
6 1960
7 1970
8 1980
9 1990

String tests
WalterWhite == WalterWhite
The 3 Musketeers == The 3 Musketeers

Function tests
Say hello there 5 times...

Hello there
Hello there
Hello there
Hello there
Hello there
Function with a single return value
81 == 81
Print all parameters of a function
String 42 true
1 String
2 42
3 true
Function with multiple return values
Jim and Jack
The first is Jim
The last is John

Logic tests
false
true
true

Ending test

0 comments on commit 1df1292

Please sign in to comment.