Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add script and data for testing. #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add script and data for testing.
larsbrinkhoff authored and Lars Brinkhoff committed Dec 8, 2021
commit 5ea1e1192d2f5c76b7ab3026de2c1864166bd16c
14 changes: 14 additions & 0 deletions test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh

set -e

test() {
./scr -rsl example.scr | ./scr -"$1" | cmp - test/test."$1"
}

test l
test s
test d
test ls
test ds
test lsd
68 changes: 68 additions & 0 deletions test/test.d
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
----------------------------------------------------------------
















----------------------------------------------------------------
2 load
ok














----------------------------------------------------------------
: ok ." Hello, World!" cr ;















----------------------------------------------------------------
















68 changes: 68 additions & 0 deletions test/test.ds
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
--- SCREEN 0 ---------------------------------------------------
















--- SCREEN 1 ---------------------------------------------------
2 load
ok














--- SCREEN 2 ---------------------------------------------------
: ok ." Hello, World!" cr ;















--- SCREEN 3 ---------------------------------------------------
















64 changes: 64 additions & 0 deletions test/test.l
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
0 2 load
1 ok
2
3
4
5
6
7
8
9
10
11
12
13
14
15
0 : ok ." Hello, World!" cr ;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
68 changes: 68 additions & 0 deletions test/test.ls
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
SCREEN 0
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
SCREEN 1
0 2 load
1 ok
2
3
4
5
6
7
8
9
10
11
12
13
14
15
SCREEN 2
0 : ok ." Hello, World!" cr ;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
SCREEN 3
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
68 changes: 68 additions & 0 deletions test/test.lsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
--- SCREEN 0 ---------------------------------------------------
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
--- SCREEN 1 ---------------------------------------------------
0 2 load
1 ok
2
3
4
5
6
7
8
9
10
11
12
13
14
15
--- SCREEN 2 ---------------------------------------------------
0 : ok ." Hello, World!" cr ;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
--- SCREEN 3 ---------------------------------------------------
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
68 changes: 68 additions & 0 deletions test/test.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
SCREEN 0
















SCREEN 1
2 load
ok














SCREEN 2
: ok ." Hello, World!" cr ;















SCREEN 3