Skip to content

Commit 31ea57c

Browse files
committed
Add some tests for fbc -print option
1 parent 13c8f9b commit 31ea57c

File tree

2 files changed

+72
-0
lines changed

2 files changed

+72
-0
lines changed

tests/fbcprint/makefile

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
FBC := fbc
2+
3+
test = echo "$(1) = `$(FBC) $(1)`" >> results.txt
4+
5+
all:
6+
rm -f results.txt
7+
8+
# -print x
9+
$(call test,-print x -target win32)
10+
$(call test,-print x -target linux)
11+
$(call test,-print x 1.bas -target win32)
12+
$(call test,-print x lib1.a -target win32)
13+
$(call test,-print x 1.o -target win32)
14+
15+
# -print target with FB target ids passed to -target
16+
$(call test,-print target -target cygwin-x86)
17+
$(call test,-print target -target cygwin-x86_64)
18+
$(call test,-print target -target darwin-x86)
19+
$(call test,-print target -target darwin-x86_64)
20+
$(call test,-print target -target dos)
21+
$(call test,-print target -target freebsd-x86)
22+
$(call test,-print target -target freebsd-x86_64)
23+
$(call test,-print target -target linux-aarch64)
24+
$(call test,-print target -target linux-arm)
25+
$(call test,-print target -target linux-x86)
26+
$(call test,-print target -target linux-x86_64)
27+
$(call test,-print target -target netbsd-x86)
28+
$(call test,-print target -target netbsd-x86_64)
29+
$(call test,-print target -target openbsd-x86)
30+
$(call test,-print target -target openbsd-x86_64)
31+
$(call test,-print target -target win32)
32+
$(call test,-print target -target win64)
33+
34+
# -print target gcc triplets passed to -target
35+
$(call test,-print target -target i686-w64-mingw32)
36+
$(call test,-print target -target i386-pc-mingw32)
37+
$(call test,-print target -target i486-pc-mingw32)
38+
$(call test,-print target -target i586-pc-mingw32)
39+
$(call test,-print target -target i686-pc-mingw32)
40+
$(call test,-print target -target x86_64-w64-mingw32)
41+
$(call test,-print target -target i386-pc-linux-gnu)
42+
$(call test,-print target -target arm-linux-gnueabihf)

tests/fbcprint/results.txt

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
-print x -target win32 = unnamed.exe
2+
-print x -target linux = unnamed
3+
-print x 1.bas -target win32 = 1.exe
4+
-print x lib1.a -target win32 = unnamed.exe
5+
-print x 1.o -target win32 = 1.exe
6+
-print target -target cygwin-x86 = cygwin-x86
7+
-print target -target cygwin-x86_64 = cygwin-x86_64
8+
-print target -target darwin-x86 = darwin-x86
9+
-print target -target darwin-x86_64 = darwin-x86_64
10+
-print target -target dos = dos
11+
-print target -target freebsd-x86 = freebsd-x86
12+
-print target -target freebsd-x86_64 = freebsd-x86_64
13+
-print target -target linux-aarch64 = linux-aarch64
14+
-print target -target linux-arm = linux-arm
15+
-print target -target linux-x86 = linux-x86
16+
-print target -target linux-x86_64 = linux-x86_64
17+
-print target -target netbsd-x86 = netbsd-x86
18+
-print target -target netbsd-x86_64 = netbsd-x86_64
19+
-print target -target openbsd-x86 = openbsd-x86
20+
-print target -target openbsd-x86_64 = openbsd-x86_64
21+
-print target -target win32 = win32
22+
-print target -target win64 = win64
23+
-print target -target i686-w64-mingw32 = win32
24+
-print target -target i386-pc-mingw32 = win32
25+
-print target -target i486-pc-mingw32 = win32
26+
-print target -target i586-pc-mingw32 = win32
27+
-print target -target i686-pc-mingw32 = win32
28+
-print target -target x86_64-w64-mingw32 = win64
29+
-print target -target i386-pc-linux-gnu = linux-x86
30+
-print target -target arm-linux-gnueabihf = linux-arm

0 commit comments

Comments
 (0)