Better probe-for-fb - look for #lf in content, instead of at file extension.

Now core test works as core.fr, not just as core.fth.
This commit is contained in:
Philip Zembrod 2023-08-26 00:30:58 +02:00
parent 71babe38da
commit 78ecc6192c
4 changed files with 11 additions and 14 deletions

View File

@ -73,7 +73,7 @@ test-std.log: \
$(patsubst tests/%, $(cpmfilesdir)/%, tests/ans-shim.fth) \
$(patsubst tests/%, $(cpmfilesdir)/%, tests/prelim.fth) \
$(patsubst tests/%, $(cpmfilesdir)/%, tests/tester.fth) \
$(patsubst tests/%, $(cpmfilesdir)/%, tests/core.fth) \
$(patsubst tests/%, $(cpmfilesdir)/%, tests/core.fr) \
| emu
./emulator/run-in-runcpm.sh \
"volks4th" \
@ -84,15 +84,12 @@ test-std.log: \
": \\vf [compile] \\ ; immediate" \
"include prelim.fth" \
"include tester.fth" \
"include core.fth" \
"include core.fr" \
"logclose" \
"bye" \
"exit"
dos2unix -n $(runcpmdir)/logfile.txt $@
tests/core.fth: tests/core.fr
cp -p $< $@
emu: $(runcpmdir)/RunCPM
%.golden: tests/golden/%.golden

File diff suppressed because one or more lines are too long

View File

@ -62,7 +62,8 @@
variable incfile
variable incpos 2 allot
create rec-offset 1 allot $80 constant dmabuf
create rec-offset 1 allot
$80 constant dmabuf | $ff constant dmabuf-last
: readrec ( fcb -- f )
0 rec-offset c! dmabuf dma! drive iread-seq ;
@ -74,10 +75,9 @@
\ *** Block No. 4, Hexblock 4
\ freadline probe-for-fb phz 06okt22
\ freadline probe-for-fb phz 25aug23
: freadline ( -- eof )
tib /tib bounds DO
@ -89,9 +89,9 @@
BEGIN inc-fgetc eolf? 1+ UNTIL tibeof @ ;
| : probe-for-fb ( -- flag )
\ probes whether current file name has no .FTH extension
isfile@ extension dup @ $dfdf and $5446 =
swap 2+ c@ $df and $48 = and not ;
dmabuf BEGIN dup c@ #lf = IF drop 0 exit THEN
1+ dup dmabuf-last u> UNTIL drop 1 ;
\ *** Block No. 5, Hexblock 5

View File

@ -45,8 +45,8 @@ and no error messages
ok
include tester.fth
TESTER.FTH ERROR exists ok
include core.fth
CORE.FTH
include core.fr
CORE.FR
*********************YOU SHOULD SEE THE STANDARD GRAPHIC CHARACTERS:
!"#$%&'()*+,-./0123456789:;<=>?@
ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`