test: add alternate binRoot example (called main)

This commit is contained in:
tydeu 2021-09-16 15:13:11 -04:00
parent 3c1185dc9c
commit b4dcad59fa
8 changed files with 25 additions and 1 deletions

View file

@ -2,7 +2,7 @@ LAKE := ../build/bin/lake
all: check-lake test time-bootstrap check-bootstrap test-bootstrapped
test: test-init test-hello test-io test-deps test-git test-ffi
test: test-init test-hello test-io test-deps test-git test-ffi test-main
check-lake:
$(LAKE) self-check
@ -25,6 +25,9 @@ test-git:
test-ffi:
cd ffi && ./test.sh
test-main:
cd main && ./test.sh
test-bootstrap:
cd bootstrap && ./test.sh

1
examples/main/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/build

View file

@ -0,0 +1 @@
def foo := "foo"

4
examples/main/Main.lean Normal file
View file

@ -0,0 +1,4 @@
import Lib.Foo
def main :=
IO.println s!"Hello, {foo}!"

1
examples/main/clean.sh Executable file
View file

@ -0,0 +1 @@
rm -rf build

View file

@ -0,0 +1,8 @@
import Lake.Package
def package : Lake.PackageConfig := {
name := "foo"
version := "1.0"
moduleRoot := `Lib
binRoot := `Main
}

1
examples/main/package.sh Executable file
View file

@ -0,0 +1 @@
../../build/bin/lake build-bin

5
examples/main/test.sh Executable file
View file

@ -0,0 +1,5 @@
set -e
./clean.sh
./package.sh
./build/bin/foo