Skip to content

Commit 9b6c751

Browse files
committed
Moved tests to their own folder.
1 parent 1fabad2 commit 9b6c751

15 files changed

+63
-34
lines changed

.gitignore

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
/local/
2-
/wiki/
1+
local/
32

43
/*.sublime-*
4+
/wiki/
55

6-
/misc/quicktest.lua
7-
/misc/quicktest.meta.lua
6+
/tests/quickTest.lua
7+
/tests/quickTest.meta.lua
88

99
/examples/*.lua
1010
!/examples/*.output.lua

misc/runQuickTest.cmd

Lines changed: 0 additions & 12 deletions
This file was deleted.

misc/runQuickTestUsingHandler.cmd

Lines changed: 0 additions & 9 deletions
This file was deleted.

preprocess-cl.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ exec lua "$0" "$@"
2222
lua preprocess-cl.lua --outputpaths [options] [--] inputpath1 outputpath1 [inputpath2 outputpath2 ...]
2323
2424
Examples:
25-
lua preprocess-cl.lua --saveinfo=misc/info.lua --silent src/main.lua2p src/network.lua2p
25+
lua preprocess-cl.lua --saveinfo=logs/info.lua --silent src/main.lua2p src/network.lua2p
2626
lua preprocess-cl.lua --debug src/main.lua2p src/network.lua2p
2727
lua preprocess-cl.lua --outputpaths --linenumbers src/main.lua2p output/main.lua src/network.lua2p output/network.lua
2828
@@ -44,7 +44,7 @@ exec lua "$0" "$@"
4444
called with various messages as it's first argument. If it's
4545
a table, the keys should be the message names and the values
4646
should be functions to handle the respective message.
47-
(See 'Handler messages' and misc/testHandler.lua)
47+
(See 'Handler messages' and tests/testHandler.lua)
4848
The file shares the same environment as the processed files.
4949
5050
--jitsyntax
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,20 @@ end
3232
)
3333

3434
local c = !(100+sum(10, 5))
35-
local str = !(run("misc/quickTestInclude.lua", "what"))
35+
local str = !(run("tests/quickTestInclude.lua", "what"))
3636

3737
_G.!!("global"..math.random(5)) = 99
3838

3939

4040

4141
-- Extended preprocessor line. (Balanced brackets.)
42-
!local arr = {
42+
!local arr = { -- Starts here.
4343
10,
4444
}; local z = (
4545
100+(3^3)
4646
)+arr[
4747
1
48-
]
48+
] -- Ends here.
4949
local z = !(z)
5050

5151
!local justTheLetterD = "d"
@@ -68,10 +68,10 @@ print(s:match(funcCall)) -- "hello5( foo )"
6868

6969
-- File inserts.
7070
!(
71-
@insert "misc/quickTest.luapart"
71+
@insert "tests/quickTest.luapart"
7272
print("Metaprogram - someString: "..someString)
7373
)
74-
local uhh = !(@insert"misc/quickTest.txt")
74+
local uhh = !(@insert"tests/quickTest.txt")
7575
print("Final program - uhh: "..uhh)
7676

7777

@@ -129,7 +129,7 @@ print("The end.")
129129

130130
!(
131131
--[==[ Test token stuff.
132-
for i, token in ipairs(assert(tokenize(assert(getFileContents"misc/quickTestInclude.lua")))) do
132+
for i, token in ipairs(assert(tokenize(assert(getFileContents"tests/quickTestInclude.lua")))) do
133133
print(i, token.type, "", (token.representation:gsub("\n", "<NEWLINE>")))
134134
end
135135

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,21 @@ print(4)
1919
print("Aaaaand...")
2020
print(6)
2121

22+
23+
2224
local c = 115
2325
local str = "Included string #64.\nargs[1] is what"
2426

2527
_G.global3 = 99
2628

29+
30+
2731
-- Extended preprocessor line. (Balanced brackets.)
2832

2933
local z = 137
3034

35+
36+
3137
-- Dual code. (Outputs both both preprocessor code and normal Lua. Can only be used for assignment statements.)
3238
local alpha = "[%a_]"
3339
local alphanum = "[%a%d_]"
@@ -40,5 +46,28 @@ print(s:match(ident)) -- "hello5"
4046
print(s:match(num)) -- "2"
4147
print(s:match(funcCall)) -- "hello5( foo )"
4248

49+
50+
51+
-- File inserts.
52+
53+
local uhh = 7
54+
print("Final program - uhh: "..uhh)
55+
56+
57+
58+
-- Macros.
59+
60+
print("Blargh!")
61+
62+
print(string.format('We are at %s:%d!', "misc/quickTest.lua2p", 87))
63+
64+
65+
66+
local ok = 1==1
67+
68+
if not (ok) then error("Oh "..tonumber("7",10).." noes!") end
69+
70+
71+
4372
print("dataFromCommandLine: Hello, world!")
4473
print("The end.")
File renamed without changes.

0 commit comments

Comments
 (0)