Skip to content

Commit 73a2b84

Browse files
committed
Allow l1c to run anywhere, fix test bug.
1 parent 883b5fe commit 73a2b84

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ tco-test: ${PROG}
3737
./l1 examples/tco.l1
3838

3939
l1c-test: ${PROG}
40-
echo "(println 1 2 3)" > l123.l1
41-
./l1c l123.l1 -o l123
42-
./l123
40+
echo "(println 1 2 3)" > /tmp/l123.l1
41+
./l1c /tmp/l123.l1 -o /tmp/l123
42+
/tmp/l123
4343

4444
lint:
4545
golint -set_exit_status .

l1c

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/bin/bash
22

3+
set -e
4+
35
unset -v outfile
46
unset -v filename
57
unset -v tmpdir
@@ -28,7 +30,7 @@ mkdir -p $tmpdir
2830

2931
echo $filename $outfile $tmpdir
3032

31-
cp $filename $tmpdir
33+
cp $filename $tmpdir/src.l1
3234
pushd $tmpdir
3335
cat <<EOF > main.go
3436
package main
@@ -38,7 +40,7 @@ import (
3840
_ "embed"
3941
)
4042
41-
//go:embed $filename
43+
//go:embed src.l1
4244
var FileSource string
4345
4446
func main() {

0 commit comments

Comments
 (0)