Skip to content

Commit e3d61c7

Browse files
committed
Add a self-hosting test.
1 parent 9f5a835 commit e3d61c7

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

langs/outlaw/Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
# ld will always choose .dylib over .a to link, so either rename or remove
44
# the .dylib versions.
55

6-
76
UNAME := $(shell uname)
87
.PHONY: test
98

@@ -79,5 +78,11 @@ stdlib.s: stdlib.rkt
7978
clean:
8079
rm *.o *.s *.run outlaw.rkt
8180

81+
outlaw2.s: outlaw.rkt outlaw.run
82+
cat outlaw.rkt | ./outlaw.run > outlaw2.s
83+
84+
self-host-test: outlaw.s outlaw2.s
85+
cmp -s outlaw.s outlaw2.s
86+
8287
test: example.run
8388
@test "$(shell ./example.run)" = "$(shell racket example.rkt)"

langs/outlaw/test/self-host.rkt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#lang racket
2+
(require rackunit)
3+
(check-true (system "make -C .. self-host-test"))

0 commit comments

Comments
 (0)