mirror of
https://github.com/forth-ev/VolksForth.git
synced 2025-01-03 05:31:14 +00:00
- enable run-in-dosbox.sh to include either .fb or .fth files
- add first test for including an .fth file - add generic rules to convert lowercase .fb files to .fth files - check in the tools/echo-toupper/tolower.py files that I left out earlier
This commit is contained in:
parent
16857ea57a
commit
533e73c29d
@ -7,12 +7,19 @@ clean:
|
||||
v4thfile.com: volks4th.com src/V4THFILE.FB \
|
||||
emulator/run-in-dosbox.sh
|
||||
rm -f V4THFILE.COM v4thfile.com
|
||||
./emulator/run-in-dosbox.sh volks4th.com v4thfile
|
||||
./emulator/run-in-dosbox.sh volks4th.com v4thfile.fb
|
||||
mv V4THFILE.COM v4thfile.com
|
||||
|
||||
incltest.log: v4thfile.com tests/LOG2FILE.FB tests/incltest.fth \
|
||||
emulator/run-in-dosbox.sh
|
||||
./emulator/run-in-dosbox.sh v4thfile.com incltest.fth
|
||||
|
||||
incltest.golden: tests/golden/incltest.golden
|
||||
cp -p $< $@
|
||||
|
||||
logtest.log: volks4th.com tests/LOG2FILE.FB tests/LOGTEST.FB \
|
||||
emulator/run-in-dosbox.sh
|
||||
./emulator/run-in-dosbox.sh volks4th.com logtest
|
||||
./emulator/run-in-dosbox.sh volks4th.com logtest.fb
|
||||
|
||||
logtest.golden: tests/golden/logtest.golden
|
||||
cp -p $< $@
|
||||
@ -21,6 +28,12 @@ logtest.golden: tests/golden/logtest.golden
|
||||
rm -f $@
|
||||
tests/evaluate-test.sh $(basename $@)
|
||||
|
||||
src/%.fth: src/%.fb ../../tools/fb2fth.py
|
||||
../../tools/fb2fth.py $< $@
|
||||
|
||||
tests/%.fth: tests/%.fb ../../tools/fb2fth.py
|
||||
../../tools/fb2fth.py $< $@
|
||||
|
||||
fbfiles = $(wildcard src/*.FB tests/*.FB)
|
||||
fthfiles = $(patsubst %.fb, %.fth, \
|
||||
$(shell ../../tools/echo-tolower.py $(fbfiles)))
|
||||
|
@ -1,17 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
emulatordir="$(realpath --relative-to="$PWD" "$(dirname "${BASH_SOURCE[0]}")")"
|
||||
basedir="$(realpath --relative-to="$PWD" "${emulatordir}/..")"
|
||||
|
||||
forth="$1"
|
||||
include_basename="$2"
|
||||
include_filename="$2"
|
||||
include_basename="${include_filename%.*}"
|
||||
forthcmd=""
|
||||
exit=""
|
||||
bye=""
|
||||
if [ -n "${include_basename}" ]; then
|
||||
forthcmd="include ${include_basename}.fb"
|
||||
forthcmd="include ${include_filename}"
|
||||
logname="${include_basename}.log"
|
||||
doslogname="$(echo ${logname}|tr '[:lower:]' '[:upper:]')"
|
||||
rm -f "${logname}" "${doslogname}"
|
||||
|
2
8086/msdos/tests/golden/incltest.golden
Normal file
2
8086/msdos/tests/golden/incltest.golden
Normal file
@ -0,0 +1,2 @@
|
||||
hello, world
|
||||
hello, world, from test-hello
|
9
8086/msdos/tests/incltest.fth
Normal file
9
8086/msdos/tests/incltest.fth
Normal file
@ -0,0 +1,9 @@
|
||||
|
||||
include log2file.fb
|
||||
logopen incltest.log
|
||||
|
||||
.( hello, world) cr
|
||||
: test-hello ." hello, world, from test-hello" cr ;
|
||||
test-hello
|
||||
|
||||
logclose
|
Binary file not shown.
5
tools/echo-tolower.py
Executable file
5
tools/echo-tolower.py
Executable file
@ -0,0 +1,5 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
import sys
|
||||
|
||||
print(' '.join(a.lower() for a in sys.argv[1:]))
|
5
tools/echo-toupper.py
Executable file
5
tools/echo-toupper.py
Executable file
@ -0,0 +1,5 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
import sys
|
||||
|
||||
print(' '.join(a.upper() for a in sys.argv[1:]))
|
Loading…
Reference in New Issue
Block a user