-
Notifications
You must be signed in to change notification settings - Fork 465
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
114 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
def main (args : List String) : IO PUnit := do | ||
IO.println s!"exe: {args}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import Lake | ||
open System Lake DSL | ||
|
||
package test | ||
|
||
@[test_runner] | ||
lean_exe test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import Lake | ||
open System Lake DSL | ||
|
||
package test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import Lake | ||
open System Lake DSL | ||
|
||
package test | ||
|
||
@[test_runner] | ||
script test args do | ||
IO.println s!"script: {args}" | ||
return 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env bash | ||
set -euxo pipefail | ||
|
||
LAKE=${LAKE:-../../.lake/build/bin/lake} | ||
|
||
# Script test runner | ||
$LAKE -f script.lean test | grep -F "script: []" | ||
$LAKE -f script.lean test -- hello | grep --color "hello" | ||
|
||
# Executable test runner | ||
$LAKE -f exe.lean test | grep -F "exe: []" | ||
$LAKE -f exe.lean test -- hello | grep --color "hello" | ||
|
||
# Test runner validation | ||
($LAKE -f two.lean test 2>&1 && false || true) | grep --color "only one" | ||
($LAKE -f none.lean test 2>&1 && false || true) | grep --color "package has no" | ||
|
||
# Test runner checker | ||
$LAKE -f exe.lean check-test | ||
$LAKE -f script.lean check-test | ||
($LAKE -f none.lean check-test && false || true) | ||
($LAKE -f two.lean check-test && false || true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import Lake | ||
open System Lake DSL | ||
|
||
package test | ||
|
||
@[test_runner] | ||
lean_exe testExe | ||
|
||
@[test_runner] | ||
script testScript do return 1 |