mirror of
https://github.com/forth-ev/VolksForth.git
synced 2024-11-16 12:09:41 +00:00
Componentize golden files for c64 and c16 forth tests
This commit is contained in:
parent
bf4dcca1b4
commit
36321c9c91
@ -20,7 +20,8 @@ vf_blk_fth: $(vf_blk_fth_files)
|
||||
|
||||
|
||||
clean:
|
||||
rm -f cbmfiles/*.fr cbmfiles/*.fth cbmfiles/*.log *.log *.result
|
||||
rm -f cbmfiles/*.fr cbmfiles/*.fth cbmfiles/*.log
|
||||
rm -f *.log *.result *.golden
|
||||
rm -f cbmfiles/c??-testbase
|
||||
rm -f disks/scratch.d64
|
||||
|
||||
@ -69,7 +70,7 @@ cbmfiles/c16-vf-32k: emulator/tcbase.T64 emulator/build-vf.sh \
|
||||
# Core test targets
|
||||
|
||||
test-c64.result: emulator/c64-vf-latest.T64 $(test_files_petscii) \
|
||||
emulator/run-in-vice.sh tests/evaluate-test.sh tests/test-c64.golden
|
||||
emulator/run-in-vice.sh tests/evaluate-test.sh test-c64.golden
|
||||
rm -f test-c64.log test-c64.result
|
||||
cp disks/empty.d64 disks/scratch.d64
|
||||
DISK9=scratch emulator/run-in-vice.sh c64-vf-latest \
|
||||
@ -78,13 +79,24 @@ test-c64.result: emulator/c64-vf-latest.T64 $(test_files_petscii) \
|
||||
tests/evaluate-test.sh test-c64
|
||||
|
||||
test-c16.result: emulator/c16-vf-latest.T64 $(test_files_petscii) \
|
||||
emulator/run-in-vice.sh tests/evaluate-test.sh tests/test-c16.golden
|
||||
emulator/run-in-vice.sh tests/evaluate-test.sh test-c16.golden
|
||||
rm -f test-c16.log test-c16.result
|
||||
VICE=xplus4 emulator/run-in-vice.sh c16-vf-latest \
|
||||
"include run-vf-tests.fth\n1234567890\n"
|
||||
petscii2ascii cbmfiles/test.log test-c16.log
|
||||
tests/evaluate-test.sh test-c16
|
||||
|
||||
c64_golden_parts = prelim core coreext double block report-blk
|
||||
c64_golden_files = $(patsubst %, tests/golden/%.golden, \
|
||||
$(c64_golden_parts))
|
||||
test-c64.golden: $(c64_golden_files)
|
||||
cat $? > $@
|
||||
|
||||
c16_golden_parts = prelim core
|
||||
c16_golden_files = $(patsubst %, tests/golden/%.golden, \
|
||||
$(c16_golden_parts))
|
||||
test-c16.golden: $(c16_golden_files)
|
||||
cat $? > $@
|
||||
|
||||
# Rules for building Forth binaries on top of the plain vanilla
|
||||
# c64-volksforth83.
|
||||
|
@ -5,7 +5,8 @@ basedir="$(realpath --relative-to="$PWD" "${testsdir}/..")"
|
||||
|
||||
testname="$1"
|
||||
|
||||
diff "${testsdir}/${testname}.golden" "${basedir}/${testname}.log" > tmp.result
|
||||
diff --ignore-trailing-space "${basedir}/${testname}.golden" \
|
||||
"${basedir}/${testname}.log" > tmp.result
|
||||
exitcode=$?
|
||||
test $exitcode -eq 0 \
|
||||
&& echo "PASS: ${testname}" >> tmp.result \
|
||||
|
134
6502/C64/tests/golden/block.golden
Normal file
134
6502/C64/tests/golden/block.golden
Normal file
@ -0,0 +1,134 @@
|
||||
|
||||
blocktest.fth**=== NOT TESTED === *******Scr 21 Dr 1
|
||||
0 Should show a (mostly) blank screen
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12
|
||||
13
|
||||
14
|
||||
15
|
||||
16
|
||||
17
|
||||
18
|
||||
19
|
||||
20
|
||||
21
|
||||
22
|
||||
23
|
||||
24
|
||||
Scr 20 Dr 1
|
||||
0 List of the First test block
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12
|
||||
13
|
||||
14
|
||||
15
|
||||
16
|
||||
17
|
||||
18
|
||||
19
|
||||
20
|
||||
21
|
||||
22
|
||||
23
|
||||
24
|
||||
Scr 29 Dr 1
|
||||
0 List of the Last test block
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12
|
||||
13
|
||||
14
|
||||
15
|
||||
16
|
||||
17
|
||||
18
|
||||
19
|
||||
20
|
||||
21
|
||||
22
|
||||
23
|
||||
24
|
||||
Scr 25 Dr 1
|
||||
0
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12
|
||||
13
|
||||
14
|
||||
15
|
||||
16
|
||||
17
|
||||
18
|
||||
19
|
||||
20
|
||||
21
|
||||
22
|
||||
23
|
||||
24 End of Screen
|
||||
Scr 21 Dr 1
|
||||
0 Should show another (mostly) blank scree
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12
|
||||
13
|
||||
14
|
||||
15
|
||||
16
|
||||
17
|
||||
18
|
||||
19
|
||||
20
|
||||
21
|
||||
22
|
||||
23
|
||||
24
|
||||
*** | exists Given Characters per Line: 41
|
||||
*
|
||||
End of Block word tests
|
32
6502/C64/tests/golden/core.golden
Normal file
32
6502/C64/tests/golden/core.golden
Normal file
@ -0,0 +1,32 @@
|
||||
|
||||
tester.fth ERROR exists
|
||||
core.fr
|
||||
*********************YOU SHOULD SEE THE STANDARD GRAPHIC CHARACTERS:
|
||||
!"#$%&'()*+,-./0123456789:;<=>?@
|
||||
abcdefghijklmnopqrstuvwxyz[\]^_`
|
||||
ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~
|
||||
YOU SHOULD SEE 0-9 SEPARATED BY A SPACE:
|
||||
0 1 2 3 4 5 6 7 8 9
|
||||
YOU SHOULD SEE 0-9 (WITH NO SPACES):
|
||||
0123456789
|
||||
YOU SHOULD SEE A-G SEPARATED BY A SPACE:
|
||||
A B C D E F G
|
||||
YOU SHOULD SEE 0-5 SEPARATED BY TWO SPACES:
|
||||
0 1 2 3 4 5
|
||||
YOU SHOULD SEE TWO SEPARATE LINES:
|
||||
LINE 1
|
||||
LINE 2
|
||||
YOU SHOULD SEE THE NUMBER RANGES OF SIGNED AND UNSIGNED NUMBERS:
|
||||
SIGNED: -8000 7FFF
|
||||
UNSIGNED: 0 FFFF
|
||||
*
|
||||
PLEASE TYPE UP TO 80 CHARACTERS:
|
||||
1234567890
|
||||
RECEIVED: "1234567890"
|
||||
* GDX exists
|
||||
End of Core word set tests
|
||||
|
||||
coreplustest.fth********
|
||||
You should see 2345: 2345
|
||||
*****
|
||||
End of additional Core tests
|
52
6502/C64/tests/golden/coreext.golden
Normal file
52
6502/C64/tests/golden/coreext.golden
Normal file
@ -0,0 +1,52 @@
|
||||
|
||||
utilities.fth ?DEFTEST1 exists
|
||||
Test utilities loaded
|
||||
|
||||
errorreport.fth
|
||||
coreexttest.fth**************
|
||||
|
||||
Output from .(
|
||||
You should see -9876: -9876
|
||||
and again: -9876
|
||||
|
||||
|
||||
On the next 2 lines you should see First then Second messages:
|
||||
First message via .(
|
||||
Second message via ."
|
||||
|
||||
*
|
||||
|
||||
Output from .R and U.R
|
||||
You should see lines duplicated:
|
||||
indented by 0 spaces
|
||||
30278
|
||||
30278
|
||||
-31871
|
||||
-31871
|
||||
30278
|
||||
30278
|
||||
33665
|
||||
33665
|
||||
|
||||
indented by 0 spaces
|
||||
30278
|
||||
30278
|
||||
-31871
|
||||
-31871
|
||||
30278
|
||||
30278
|
||||
33665
|
||||
33665
|
||||
|
||||
indented by 5 spaces
|
||||
30278
|
||||
30278
|
||||
-31871
|
||||
-31871
|
||||
30278
|
||||
30278
|
||||
33665
|
||||
33665
|
||||
|
||||
***
|
||||
End of Core Extension word tests
|
3
6502/C64/tests/golden/double.golden
Normal file
3
6502/C64/tests/golden/double.golden
Normal file
@ -0,0 +1,3 @@
|
||||
|
||||
doubletest.fth*****************
|
||||
End of Double-Number word tests
|
@ -1,5 +1,5 @@
|
||||
|
||||
ans-shim.fth CHAR exists 0> exists
|
||||
ans-shim.fth CHAR exists 0> exists
|
||||
|
||||
prelimtest.fth
|
||||
|
||||
@ -31,7 +31,7 @@ Pass #21: testing ?~
|
||||
Pass #22: testing EMIT
|
||||
Pass #23: testing S"
|
||||
|
||||
Results:
|
||||
Results:
|
||||
|
||||
Pass messages #1 to #23 should be displayed above
|
||||
and no error messages
|
||||
@ -39,36 +39,4 @@ and no error messages
|
||||
0 tests failed out of 57 additional tests
|
||||
|
||||
|
||||
--- End of Preliminary Tests ---
|
||||
|
||||
tester.fth ERROR exists
|
||||
core.fr
|
||||
*********************YOU SHOULD SEE THE STANDARD GRAPHIC CHARACTERS:
|
||||
!"#$%&'()*+,-./0123456789:;<=>?@
|
||||
abcdefghijklmnopqrstuvwxyz[\]^_`
|
||||
ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~
|
||||
YOU SHOULD SEE 0-9 SEPARATED BY A SPACE:
|
||||
0 1 2 3 4 5 6 7 8 9
|
||||
YOU SHOULD SEE 0-9 (WITH NO SPACES):
|
||||
0123456789
|
||||
YOU SHOULD SEE A-G SEPARATED BY A SPACE:
|
||||
A B C D E F G
|
||||
YOU SHOULD SEE 0-5 SEPARATED BY TWO SPACES:
|
||||
0 1 2 3 4 5
|
||||
YOU SHOULD SEE TWO SEPARATE LINES:
|
||||
LINE 1
|
||||
LINE 2
|
||||
YOU SHOULD SEE THE NUMBER RANGES OF SIGNED AND UNSIGNED NUMBERS:
|
||||
SIGNED: -8000 7FFF
|
||||
UNSIGNED: 0 FFFF
|
||||
*
|
||||
PLEASE TYPE UP TO 80 CHARACTERS:
|
||||
1234567890
|
||||
RECEIVED: "1234567890"
|
||||
* GDX exists
|
||||
End of Core word set tests
|
||||
|
||||
coreplustest.fth********
|
||||
You should see 2345: 2345
|
||||
*****
|
||||
End of additional Core tests
|
||||
--- End of Preliminary Tests ---
|
21
6502/C64/tests/golden/report-blk.golden
Normal file
21
6502/C64/tests/golden/report-blk.golden
Normal file
@ -0,0 +1,21 @@
|
||||
|
||||
---------------------------
|
||||
Error Report
|
||||
Word Set Errors
|
||||
---------------------------
|
||||
Core 0
|
||||
Core extension 0
|
||||
Block 0
|
||||
Double number 0
|
||||
Exception -
|
||||
Facility -
|
||||
File-access -
|
||||
Locals -
|
||||
Memory-allocation -
|
||||
Programming-tools -
|
||||
Search-order -
|
||||
String -
|
||||
---------------------------
|
||||
Total 0
|
||||
---------------------------
|
||||
|
21
6502/C64/tests/golden/report-noblk.golden
Normal file
21
6502/C64/tests/golden/report-noblk.golden
Normal file
@ -0,0 +1,21 @@
|
||||
|
||||
---------------------------
|
||||
Error Report
|
||||
Word Set Errors
|
||||
---------------------------
|
||||
Core 0
|
||||
Core extension 0
|
||||
Block -
|
||||
Double number 0
|
||||
Exception -
|
||||
Facility -
|
||||
File-access -
|
||||
Locals -
|
||||
Memory-allocation -
|
||||
Programming-tools -
|
||||
Search-order -
|
||||
String -
|
||||
---------------------------
|
||||
Total 0
|
||||
---------------------------
|
||||
|
@ -1,284 +0,0 @@
|
||||
|
||||
ans-shim.fth CHAR exists 0> exists
|
||||
|
||||
prelimtest.fth
|
||||
|
||||
CR CR SOURCE TYPE ( Preliminary test ) CR
|
||||
SOURCE ( These lines test SOURCE, TYPE, CR and parenthetic comments ) TYPE CR
|
||||
( The next line of output should be blank to test CR ) SOURCE TYPE CR CR
|
||||
|
||||
( Pass #1: testing 0 >IN +! ) 0 >IN +! SOURCE TYPE CR
|
||||
( Pass #2: testing 1 >IN +! ) 1 >IN +! xSOURCE TYPE CR
|
||||
( Pass #3: testing 1+ ) 1 1+ >IN +! xxSOURCE TYPE CR
|
||||
( Pass #4: testing @ ! BASE ) 0 1+ 1+ BASE ! BASE @ >IN +! xxSOURCE TYPE CR
|
||||
( Pass #5: testing decimal BASE ) BASE @ >IN +! xxxxxxxxxxSOURCE TYPE CR
|
||||
( Pass #6: testing : ; ) : .SRC SOURCE TYPE CR ; 6 >IN +! xxxxxx.SRC
|
||||
( Pass #7: testing number input ) 19 >IN +! xxxxxxxxxxxxxxxxxxx.SRC
|
||||
( Pass #8: testing VARIABLE ) VARIABLE Y 2 Y ! Y @ >IN +! xx.SRC
|
||||
( Pass #9: testing WORD COUNT ) 5 MSG abcdef) Y ! Y ! >IN +! xxxxx.SRC
|
||||
( Pass #10: testing WORD COUNT ) MSG ab) >IN +! xxY ! .SRC
|
||||
Pass #11: testing WORD COUNT .MSG
|
||||
Pass #12: testing = returns all 1's for true
|
||||
Pass #13: testing = returns 0 for false
|
||||
Pass #14: testing -1 interpreted correctly
|
||||
Pass #15: testing 2*
|
||||
Pass #16: testing 2*
|
||||
Pass #17: testing AND
|
||||
Pass #18: testing AND
|
||||
Pass #19: testing AND
|
||||
Pass #20: testing ?F~ ?~~ Pass Error
|
||||
Pass #21: testing ?~
|
||||
Pass #22: testing EMIT
|
||||
Pass #23: testing S"
|
||||
|
||||
Results:
|
||||
|
||||
Pass messages #1 to #23 should be displayed above
|
||||
and no error messages
|
||||
|
||||
0 tests failed out of 57 additional tests
|
||||
|
||||
|
||||
--- End of Preliminary Tests ---
|
||||
|
||||
tester.fth ERROR exists
|
||||
core.fr
|
||||
*********************YOU SHOULD SEE THE STANDARD GRAPHIC CHARACTERS:
|
||||
!"#$%&'()*+,-./0123456789:;<=>?@
|
||||
abcdefghijklmnopqrstuvwxyz[\]^_`
|
||||
ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~
|
||||
YOU SHOULD SEE 0-9 SEPARATED BY A SPACE:
|
||||
0 1 2 3 4 5 6 7 8 9
|
||||
YOU SHOULD SEE 0-9 (WITH NO SPACES):
|
||||
0123456789
|
||||
YOU SHOULD SEE A-G SEPARATED BY A SPACE:
|
||||
A B C D E F G
|
||||
YOU SHOULD SEE 0-5 SEPARATED BY TWO SPACES:
|
||||
0 1 2 3 4 5
|
||||
YOU SHOULD SEE TWO SEPARATE LINES:
|
||||
LINE 1
|
||||
LINE 2
|
||||
YOU SHOULD SEE THE NUMBER RANGES OF SIGNED AND UNSIGNED NUMBERS:
|
||||
SIGNED: -8000 7FFF
|
||||
UNSIGNED: 0 FFFF
|
||||
*
|
||||
PLEASE TYPE UP TO 80 CHARACTERS:
|
||||
1234567890
|
||||
RECEIVED: "1234567890"
|
||||
* GDX exists
|
||||
End of Core word set tests
|
||||
|
||||
coreplustest.fth********
|
||||
You should see 2345: 2345
|
||||
*****
|
||||
End of additional Core tests
|
||||
|
||||
utilities.fth ?DEFTEST1 exists
|
||||
Test utilities loaded
|
||||
|
||||
errorreport.fth
|
||||
coreexttest.fth**************
|
||||
|
||||
Output from .(
|
||||
You should see -9876: -9876
|
||||
and again: -9876
|
||||
|
||||
|
||||
On the next 2 lines you should see First then Second messages:
|
||||
First message via .(
|
||||
Second message via ."
|
||||
|
||||
*
|
||||
|
||||
Output from .R and U.R
|
||||
You should see lines duplicated:
|
||||
indented by 0 spaces
|
||||
30278
|
||||
30278
|
||||
-31871
|
||||
-31871
|
||||
30278
|
||||
30278
|
||||
33665
|
||||
33665
|
||||
|
||||
indented by 0 spaces
|
||||
30278
|
||||
30278
|
||||
-31871
|
||||
-31871
|
||||
30278
|
||||
30278
|
||||
33665
|
||||
33665
|
||||
|
||||
indented by 5 spaces
|
||||
30278
|
||||
30278
|
||||
-31871
|
||||
-31871
|
||||
30278
|
||||
30278
|
||||
33665
|
||||
33665
|
||||
|
||||
***
|
||||
End of Core Extension word tests
|
||||
|
||||
doubletest.fth*****************
|
||||
End of Double-Number word tests
|
||||
|
||||
blocktest.fth**=== NOT TESTED === *******Scr 21 Dr 1
|
||||
0 Should show a (mostly) blank screen
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12
|
||||
13
|
||||
14
|
||||
15
|
||||
16
|
||||
17
|
||||
18
|
||||
19
|
||||
20
|
||||
21
|
||||
22
|
||||
23
|
||||
24
|
||||
Scr 20 Dr 1
|
||||
0 List of the First test block
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12
|
||||
13
|
||||
14
|
||||
15
|
||||
16
|
||||
17
|
||||
18
|
||||
19
|
||||
20
|
||||
21
|
||||
22
|
||||
23
|
||||
24
|
||||
Scr 29 Dr 1
|
||||
0 List of the Last test block
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12
|
||||
13
|
||||
14
|
||||
15
|
||||
16
|
||||
17
|
||||
18
|
||||
19
|
||||
20
|
||||
21
|
||||
22
|
||||
23
|
||||
24
|
||||
Scr 25 Dr 1
|
||||
0
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12
|
||||
13
|
||||
14
|
||||
15
|
||||
16
|
||||
17
|
||||
18
|
||||
19
|
||||
20
|
||||
21
|
||||
22
|
||||
23
|
||||
24 End of Screen
|
||||
Scr 21 Dr 1
|
||||
0 Should show another (mostly) blank scree
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12
|
||||
13
|
||||
14
|
||||
15
|
||||
16
|
||||
17
|
||||
18
|
||||
19
|
||||
20
|
||||
21
|
||||
22
|
||||
23
|
||||
24
|
||||
*** | exists Given Characters per Line: 41
|
||||
*
|
||||
End of Block word tests
|
||||
|
||||
---------------------------
|
||||
Error Report
|
||||
Word Set Errors
|
||||
---------------------------
|
||||
Core 0
|
||||
Core extension 0
|
||||
Block 0
|
||||
Double number 0
|
||||
Exception -
|
||||
Facility -
|
||||
File-access -
|
||||
Locals -
|
||||
Memory-allocation -
|
||||
Programming-tools -
|
||||
Search-order -
|
||||
String -
|
||||
---------------------------
|
||||
Total 0
|
||||
---------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user