Skip to content

Commit f3423ca

Browse files
author
Stefan Reinauer
committed
update test suite to v1.0.1
git-svn-id: svn://coreboot.org/openbios/fcode-utils@95 f158a5a8-5612-0410-a976-696ce0be7e32
1 parent 372c7c4 commit f3423ca

24 files changed

Lines changed: 1309 additions & 113 deletions

testsuite/TokCondl/CondMacAlias_01.fth

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,15 @@
7777
: [else] ." Don't do it" ; [message] Fake [else] got through
7878
create [else] [message] Fake [else] got through
7979
h# defeca8e constant [else] [message] Fake [else] got through
80-
h# beeffece value [else] [message] Fake [else] got through
80+
h# -41100132 value [else] [message] Fake [else] got through
8181
d# 64 buffer: [else] [message] Fake [else] got through
8282
struct
8383
/l field [else] [message] Fake [else] got through
8484
variable [else] [message] Fake [else] got through
8585
defer [else] [message] Fake [else] got through
8686
['] [else] [message] Fake [else] got through
8787
to [else] [message] Fake [else] got through
88-
['] [else]
88+
['] [else] alias moomoo [else]
8989
is [else] [message] Fake [else] got through
9090
: say-what ( tony vinnie looie --
9191
-- marie )

testsuite/TokMisc/AllBiFCTypes.fth

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
\ Test all the known Built-In FCode tokens
2+
\ that have specific definition Types
3+
4+
\ Updated Wed, 16 Aug 2006 at 14:30 PDT by David L. Paktor
5+
6+
\ Applying "TO" to them ought to generate errors
7+
\ except for the ones that legitimately take "TO",
8+
\ namely the DEFER and VALUE definitions
9+
10+
fcode-version2
11+
12+
13+
[message] Constants. Should generate errors
14+
d# 10 to -1 ( CONST )
15+
d# 10 to -1 ( CONST )
16+
d# 10 to 0 ( CONST )
17+
d# 10 to 0 ( CONST )
18+
d# 10 to 0 ( CONST )
19+
d# 10 to 1 ( CONST )
20+
d# 10 to 2 ( CONST )
21+
d# 10 to 3 ( CONST )
22+
d# 10 to bell ( CONST )
23+
d# 10 to bl ( CONST )
24+
d# 10 to bs ( CONST )
25+
26+
[message] Defer Words. Should generate no errors
27+
['] noop to blink-screen ( DEFER )
28+
['] noop to delete-characters ( DEFER )
29+
['] noop to delete-lines ( DEFER )
30+
['] noop to draw-character ( DEFER )
31+
['] noop to draw-logo ( DEFER )
32+
['] noop to erase-screen ( DEFER )
33+
['] noop to insert-characters ( DEFER )
34+
['] noop to insert-lines ( DEFER )
35+
['] noop to invert-screen ( DEFER )
36+
['] noop to reset-screen ( DEFER )
37+
['] noop to toggle-cursor ( DEFER )
38+
39+
[message] Value Words. Should generate no errors
40+
h# 32 to #columns ( VALUE )
41+
h# 32 to #lines ( VALUE )
42+
h# 32 to char-height ( VALUE )
43+
h# 32 to char-width ( VALUE )
44+
h# 32 to column# ( VALUE )
45+
h# 32 to fontbytes ( VALUE )
46+
h# 32 to frame-buffer-adr ( VALUE )
47+
h# 32 to inverse-screen? ( VALUE )
48+
h# 32 to inverse? ( VALUE )
49+
h# 32 to line# ( VALUE )
50+
h# 32 to my-self ( VALUE )
51+
h# 32 to screen-height ( VALUE )
52+
h# 32 to screen-width ( VALUE )
53+
h# 32 to window-left ( VALUE )
54+
h# 32 to window-top ( VALUE )
55+
56+
[message] Variables. Should generate errors
57+
h# 12 to #line ( VRBLE )
58+
h# 12 to #out ( VRBLE )
59+
h# 12 to base ( VRBLE )
60+
h# 12 to mask ( VRBLE )
61+
h# 12 to span ( VRBLE )
62+
h# 12 to state ( VRBLE )
63+
64+
fcode-end

testsuite/TokMisc/TestArgs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# Lines that have no label, no switches, and no script
99
# do not need any commas.
1010

11-
# Updated Thu, 06 Jul 2006 at 13:16 PDT by David L. Paktor
11+
# Updated Thu, 07 Sep 2006 at 11:49 PDT by David L. Paktor
1212

1313
MiscFeatures , , -i
1414
MiscFeatures , applabq , -i -f NOSUN-ABORT-Quote
@@ -46,7 +46,9 @@ HeadrSettings
4646
HeadrSettings , alwyshdr , -f always-heADERs
4747
HeadrSettings , alwyextl , -f alwaYS-External
4848
HeadrSettings , alwaysboth , -f always-headers -f always-external
49-
FlagsHelp , , -f HELP
49+
FlagsHelp , Hlp , -f HELP
50+
FlagsHelp , , -o FlagsHelp.fc FlagsHelp.fth
51+
FlagsHelp , UnkOpt , -Z
5052
FlagsHelp , Chg , -f noHex-remark-ESCAPE -f Always-Headers -f help
5153
FlagsHelp , noChg , -f noLocal-Values -f help
5254
FlagsHelp , chgNoHlp , -f noHex-remark-escape -f Always-Headers -f noHelp
@@ -55,6 +57,7 @@ FlgReset , Solo
5557
FlgReset FlgReset_1 FlgReset_2
5658
FlgReset FlgReset_1 FlgReset_2 , AlwExt , -f Always-External
5759
AllMacros , , , ExamAllMacs.scr
60+
AllBiFCTypes
5861

5962
# A little more set-up for Batch Test
6063
UserMacros , , , cp UserMacros.fth UserMacros_cpy1.fth

testsuite/TokeErrs/DupNams.fth

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ fcode-version2
3333

3434
: noop ." Op? No!" ;
3535
[macro] zoop noop message" I Care."
36-
: poop h# defeca8e ;
36+
: poop h# -21013572 ;
3737

3838
new-device
3939
: zoop ." Nothing like the other zoop" croop ;
@@ -74,8 +74,18 @@ fcode-version2
7474
finish-device
7575

7676
finish-device
77-
77+
start4 \ Let's just stick in an extra, and another error besides...
7878
fcode-end
7979

80-
\ Let's just stick in an extra...
80+
\ And a few false-starts and ends...
8181
fcode-end
82+
83+
start0
84+
." What does this button do?"
85+
end1
86+
87+
start2
88+
." Oh, was I not supposed to touch that?"
89+
end0
90+
91+
save-image poop.fc \ Not gonna happen anyway...

testsuite/TokeErrs/GlobScopErrTst.fth

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ new-device [message] Missing a finish-device
7373
garbanzo
7474
;
7575

76-
h# deadc0de instance value quaack [message] Instance should be legit here.
76+
h# DEADc0de instance value quaack [message] Instance should be legit here.
7777

7878
global-definitions
7979

testsuite/TokeErrs/LocalTest.fth

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
\ LocalTest.fth
2-
\ Updated Wed, 25 Jan 2006 at 14:33 PST by David L. Paktor
2+
\ Updated Thu, 31 Aug 2006 at 15:33 PDT by David L. Paktor
33

44
fcode-version2
55

@@ -9,7 +9,7 @@ fcode-version2
99
fload LocalValuesSupport.fth
1010
[endif]
1111

12-
h# deaf constant dean
12+
h# Deaf constant dean
1313

1414
: faber ( n3 n2 n1 -- alloc-addr size $addr,len )
1515
{ _otter _weasel _skunk ; _muskrat _mole }
@@ -58,6 +58,31 @@ f[
5858
: ordinary ( -- )
5959
123 456 789 miracle
6060
;
61+
62+
{ _don't _allow _this ; _ever }
6163

64+
F[
65+
{ _nor _this ; _either }
66+
]F
67+
68+
\ And the "unterminated" tests
69+
70+
: ahnold ( the unterminator )
71+
fload UntermLocalDecl.fth
72+
} \ Does this conclude it okay? (No, it's extraneous...)
73+
_green _goose + dup
74+
-> _souvenirs
75+
fload UntermLocalAssgmnt.fth
76+
_souvenirs
77+
;
78+
79+
\ Once more, out of context:
80+
fload UntermLocalDecl.fth
81+
fload UntermLocalAssgmnt.fth _souvenirs
82+
83+
\ And another couple of corner-cases:
84+
fload UntermDefn.fth moopoop
85+
F[ fload UntermDefn.fth poop-de-moo ]F
86+
6287
fcode-end
6388

testsuite/TokeErrs/MiscFeatErrs.fth

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33

44
[flag] Local-Values
55
f[ ." This is a test" ]f
6-
fcode-version2
6+
fcode-version1
77

88
fload LocalValuesSupport.fth
9-
9+
noop noop noop
1010
headers
1111

1212
[char] G emit
@@ -32,8 +32,8 @@ control [ emit
3232
[macro] swell bell
3333
device-definitions
3434
[macro] yell bell
35-
36-
bell
35+
offset16
36+
bell offset16
3737
: factl ( n -- n! )
3838
?dup 0= if 1 factl
3939
control G to bell

testsuite/TokeErrs/MulPCI_LapFC.fth

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
\ Combine Multiple PCI headers with overlapping FCodes.
2-
\ Updated Wed, 14 Jun 2006 at 12:04 PDT by David L. Paktor
2+
\ Updated Fri, 01 Sep 2006 at 12:55 PDT by David L. Paktor
33

44
\ We already have a source with overlapping FCodes in two FCode blocks
55
\ We just have to wrap it in multiple PCI headers.
66
\ Also, we have to make sure to define NoCrash as a command-line symbol
77
\ While we're at it, let's also create another switchable behavior:
88
\ If the command-line symbol RangeTwo is defined, it should have
9-
\ a value in the form of a hex number (We'll tace care of the "hex")
9+
\ a value in the form of a hex number (We'll take care of the "hex")
1010
\ which will, in a roundabout way, become the starting FCode for
1111
\ the second loading of the common Source.
1212
\ We'll save the symbol in a roundabout manner that will test whether
@@ -37,11 +37,11 @@ h# 20109 \ Bogus Class Code
3737
fload TooManyFCodes.fth
3838

3939

40-
[ifdef] RangeTwo
40+
\ Generate an error or two if RangeTwo is not DEFINED. It's harmless
4141
f[
4242
[DEFINED] RangeTwo constant SecondRangeFCode
4343
]f
44-
[endif]
44+
\ because all the other references to SecondRangeFCode are conditioned...
4545

4646
\ Try it once before and once after...
4747
[ifndef] NoReset fcode-reset [else] #message" Not resetting..." [endif]

testsuite/TokeErrs/PCIhdrErrs.fth

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
\ Basic PCI-Headers Errors test.
22

3-
\ Updated Wed, 25 May 2005 at 17:30 by David L. Paktor
3+
\ Updated Thu, 31 Aug 2006 at 13:27 PDT by David L. Paktor
44

55

66
hex
@@ -26,3 +26,6 @@ fcode-end
2626

2727
pci-header-end
2828

29+
\ This is another...
30+
31+
pci-header-end

testsuite/TokeErrs/TestArgs

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
# Most files in this category need the -i switch
1414
# Some may have additional variants.
1515

16-
# Updated Thu, 27 Jul 2006 at 17:55 PDT by David L. Paktor
16+
# Updated Thu, 07 Sep 2006 at 11:49 PDT by David L. Paktor
1717

1818
MiscFeatErrs , , -i -I. -I..
19-
LocalTest , NoLvSupp , -i -I. -I.. -f Local-Values
20-
LocalTest , , -i -f Local-Values -d dont_omit_support -I. -I..
19+
LocalTest , NoLvSupp , -i -f Local-Values -I. -I..
20+
LocalTest , , -i -f Local-Values -I. -I.. -f Always-Headers -d dont_omit_support
2121
LocalTest1 , , -f Local-Values -f noLV-Legacy-Message -I. -I..
2222
ControlMismatch , , -i
2323
SuppLocErrTest4 , , -i -f Local-Values -l -I. -I..
@@ -40,6 +40,7 @@ TooLargeBranch_off16 , V178 , -i -l -d "fld_cmd=fload TooLargeBranch_V178_body.f
4040
TooLargeBranch_off16 , V179 , -i -l -d "fld_cmd=fload TooLargeBranch_V179_body.fth"
4141
TooLargeBranch_off16 , V180 , -i -l -d "fld_cmd=fload TooLargeBranch_V180_body.fth"
4242
TooLargeBranch_off08 , , -i -l
43+
TooLargeBranch_off08 , V180 , -i -l -d "fld_cmd=fload TooLargeBranch_V180_body.fth"
4344
TooLargeBranch_off08_to_16 , , -i -l
4445
TooTooLargeBuffer , , -i -l
4546
UserMacroErrors , , -i
@@ -52,13 +53,13 @@ GlobScopErrTst , , -i -f Local-Values -I. -I..
5253
GlobScopErrTst_01 , , -i -f Local-Values -I. -I..
5354
GlobScopErrTst_02 , , -i -f Local-Values -I. -I..
5455
GlobScopErrTst_03 , , -i -f Local-Values -I. -I..
55-
# The script-fields below prepare for the ExpPath and InclLst tests
56-
Frinstnce , , -i , touch ExpPath.NoV.f{c,l{,.missing}}
57-
Frinstnce , NoI , , chmod a-rw ../TokeCommon/{MyBeerAndYouCannotHaveIt.fth,NoRead.bin} ExpPath.NoV.f{c,l{,.missing}}
56+
# The script-fields below prepare for the ExpPath InclLst and DePList tests
57+
Frinstnce , , -i , touch ExpPath.NoV.{P,f{c,l{,.missing}}}
58+
Frinstnce , NoI , , chmod a-rw ../TokeCommon/{MyBeerAndYouCannotHaveIt.fth,NoRead.bin} ExpPath.NoV.{P,f{c,l{,.missing}}}
5859

59-
# We're now ready for the ExpPath and InclLst tests
60+
# We're now ready for the ExpPath InclLst and DePList tests
6061

61-
ExpPath , NoV , -i -l , +V rm -f ExpPath.NoV.f{c,l{,.missing}}
62+
ExpPath , NoV , -i -l -P , +V rm -f ExpPath.NoV.{P,f{c,l{,.missing}}}
6263

6364
InclLst , , -i -l -P -I .. -I ../TokBrack -I ../TokMisc -I ../TokeCommon -I ../TokoLoco -I ../TokCondl -I ../TokProdCpy -I ../TokeErrs -I /home/dlpaktor/HeyVern/DoYuhThink/ThisIsA/LongEnuffPathName/To/Make/The/Line/Really/Overflow -I . -I /home/dlpaktor/Hey/Vern/This/Path/Just/Fills/Up/TheLine/KnowWhudI/Mean -I ../TokeCommon -f noAbort-quote
6465

@@ -68,29 +69,32 @@ ExpPath , , -i -l , chmod a+r ../TokeCommon/{MyBeerAndYouCannotHaveIt.fth,NoRead
6869

6970
# Done with the ExpPath and InclLst tests
7071
ToAtEnd , , -i
72+
ToAtEnd , WLocSup , -i -I . -I ..
7173
ObsoFCodes , , -i
7274
ObsoFCodes , NoWarn , -f NoObsolete-FCode-Warning
7375

7476
TooLargePMessage
7577
TooLargePQuote , , -i
7678
TooLargeQMessage
77-
TooLargeSQuote
79+
TooLargeSQuote , , -i
7880
TooLargeParen , , -i
7981
TooLargeQAbort
80-
TooLargeQNoAbort
82+
TooLargeQNoAbort , , -f Local-Values
8183

8284
AbrtWQuotStr , , -i
8385

8486
# The new "Trace" feature, and handling of duplicate and mis-scoped names...
8587
DupNams , , -f Local-Values -T croop -T drop -T _harpo -T dup -T noop -T zoop -T foop
8688

87-
TooManyFCodes , , -i
89+
TooManyFCodes , , -l -o TooManyFCodes.fl
90+
TooManyFCodes , Reg , -i
8891
TooManyFCodes , NoCrash , -i -d NoCrash
8992

9093
MulPCI_LapFC , , -i -d NoCrash
91-
MulPCI_LapFC , RngTwo , -i -d NoCrash -d RangeTwo=0ace
94+
MulPCI_LapFC , RngTwo , -i -d NoCrash=DupDefn -d NoCrash -d OIBeenToTheOasis=Twice -d RangeTwo=0941 -d NoCrash -d RangeTwo=0ace
9295
MulPCI_LapFC , RTwoNoRst , -i -d NoCrash -d RangeTwo=0ace -d NoReset
9396
MulPCI_LapFC , NoRst , -i -d NoCrash -d NoReset
97+
MulPCI_LapFC , NoRTwoVal , -i -d NoCrash -d NoReset -d RangeTwo
9498

9599
RetStkDep , , -i
96100
CondlDefn , , -i

0 commit comments

Comments
 (0)