Skip to content

Commit 06cc339

Browse files
committed
[ fix ] another big batch of tests
1 parent 6e6f3f7 commit 06cc339

File tree

27 files changed

+460
-37
lines changed

27 files changed

+460
-37
lines changed

tests/data/list/list.agda-lib

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
name: list
22
include: ../../../src/ .
3+
flags:
4+
--warning=noUnsupportedIndexedMatch

tests/data/list/list.cabal

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
cabal-version: 2.4
2+
name: list
3+
version: 2.0
4+
build-type: Simple
5+
description: Run this test
6+
license: MIT
7+
8+
tested-with:
9+
GHC == 9.2.8
10+
11+
common common-build-parameters
12+
default-language:
13+
Haskell2010
14+
15+
default-extensions:
16+
PatternGuards
17+
PatternSynonyms
18+
19+
build-depends:
20+
base >= 4.12 && < 4.20
21+
22+
ghc-options: -Wno-missing-home-modules
23+
24+
executable list
25+
import: common-build-parameters
26+
hs-source-dirs: _build
27+
main-is: MAlonzo/Code/Main.hs
28+
ghc-options: -main-is MAlonzo.Code.Main

tests/data/list/run

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
1-
$1 --compile-dir=../../_build -c Main.agda > log
2-
./../../_build/Main > output
1+
TEST_NAME=list
32

4-
rm ../../_build/Main
5-
rm ../../_build/MAlonzo/Code/Main*
3+
# Get configuration information
4+
. ../../config.sh
5+
6+
# Set up clean logs directory
7+
rm -rf logs/
8+
mkdir logs
9+
10+
# Use pre-existing build directory to avoid rechecking stdlib modules
11+
ln -sf ../../_build _build
12+
13+
# Compile the Agda module and build the generated code
14+
$1 --compile-dir=_build -c --ghc-dont-call-ghc Main.agda > logs/agda-build
15+
cabal build "$TEST_NAME" --with-compiler "$GHC_EXEC" > logs/cabal-build
16+
17+
# Run the test
18+
cabal exec "$TEST_NAME" --with-compiler "$GHC_EXEC" > output
19+
20+
# Clean up after ourselves
21+
rm -R dist-newstyle
22+
rm -R _build/MAlonzo/Code/
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
name: rational
1+
name: rational-unnormalised
22
include: ../../../src/ .
3+
flags:
4+
--warning=noUnsupportedIndexedMatch
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
cabal-version: 2.4
2+
name: rational-unnormalised
3+
version: 2.0
4+
build-type: Simple
5+
description: Run this test
6+
license: MIT
7+
8+
tested-with:
9+
GHC == 9.2.8
10+
11+
common common-build-parameters
12+
default-language:
13+
Haskell2010
14+
15+
default-extensions:
16+
PatternGuards
17+
PatternSynonyms
18+
19+
build-depends:
20+
base >= 4.12 && < 4.20
21+
22+
ghc-options: -Wno-missing-home-modules
23+
24+
executable rational-unnormalised
25+
import: common-build-parameters
26+
hs-source-dirs: _build
27+
main-is: MAlonzo/Code/Main.hs
28+
ghc-options: -main-is MAlonzo.Code.Main
Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
1-
$1 --compile-dir=../../_build -c Main.agda > log
2-
./../../_build/Main > output
1+
TEST_NAME=rational-unnormalised
32

4-
rm ../../_build/Main
5-
rm ../../_build/MAlonzo/Code/Main*
3+
# Get configuration information
4+
. ../../config.sh
5+
6+
# Set up clean logs directory
7+
rm -rf logs/
8+
mkdir logs
9+
10+
# Use pre-existing build directory to avoid rechecking stdlib modules
11+
ln -sf ../../_build _build
12+
13+
# Compile the Agda module and build the generated code
14+
$1 --compile-dir=_build -c --ghc-dont-call-ghc Main.agda > logs/agda-build
15+
cabal build "$TEST_NAME" --with-compiler "$GHC_EXEC" > logs/cabal-build
16+
17+
# Run the test
18+
cabal exec "$TEST_NAME" --with-compiler "$GHC_EXEC" > output
19+
20+
# Clean up after ourselves
21+
rm -R dist-newstyle
22+
rm -R _build/MAlonzo/Code/
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
name: rational
22
include: ../../../src/ .
3+
flags:
4+
--warning=noUnsupportedIndexedMatch

tests/data/rational/rational.cabal

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
cabal-version: 2.4
2+
name: rational
3+
version: 2.0
4+
build-type: Simple
5+
description: Run this test
6+
license: MIT
7+
8+
tested-with:
9+
GHC == 9.2.8
10+
11+
common common-build-parameters
12+
default-language:
13+
Haskell2010
14+
15+
default-extensions:
16+
PatternGuards
17+
PatternSynonyms
18+
19+
build-depends:
20+
base >= 4.12 && < 4.20
21+
22+
ghc-options: -Wno-missing-home-modules
23+
24+
executable rational
25+
import: common-build-parameters
26+
hs-source-dirs: _build
27+
main-is: MAlonzo/Code/Main.hs
28+
ghc-options: -main-is MAlonzo.Code.Main

tests/data/rational/run

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
1-
$1 --compile-dir=../../_build -c Main.agda > log
2-
./../../_build/Main > output
1+
TEST_NAME=rational
32

4-
rm ../../_build/Main
5-
rm ../../_build/MAlonzo/Code/Main*
3+
# Get configuration information
4+
. ../../config.sh
5+
6+
# Set up clean logs directory
7+
rm -rf logs/
8+
mkdir logs
9+
10+
# Use pre-existing build directory to avoid rechecking stdlib modules
11+
ln -sf ../../_build _build
12+
13+
# Compile the Agda module and build the generated code
14+
$1 --compile-dir=_build -c --ghc-dont-call-ghc Main.agda > logs/agda-build
15+
cabal build "$TEST_NAME" --with-compiler "$GHC_EXEC" > logs/cabal-build
16+
17+
# Run the test
18+
cabal exec "$TEST_NAME" --with-compiler "$GHC_EXEC" > output
19+
20+
# Clean up after ourselves
21+
rm -R dist-newstyle
22+
rm -R _build/MAlonzo/Code/

tests/data/trie/run

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
1-
$1 --compile-dir=../../_build -c Main.agda > log
2-
./../../_build/Main > output
1+
TEST_NAME=trie
32

4-
rm ../../_build/Main
5-
rm ../../_build/MAlonzo/Code/Main*
3+
# Get configuration information
4+
. ../../config.sh
5+
6+
# Set up clean logs directory
7+
rm -rf logs/
8+
mkdir logs
9+
10+
# Use pre-existing build directory to avoid rechecking stdlib modules
11+
ln -sf ../../_build _build
12+
13+
# Compile the Agda module and build the generated code
14+
$1 --compile-dir=_build -c --ghc-dont-call-ghc Main.agda > logs/agda-build
15+
cabal build "$TEST_NAME" --with-compiler "$GHC_EXEC" > logs/cabal-build
16+
17+
# Run the test
18+
cabal exec "$TEST_NAME" --with-compiler "$GHC_EXEC" > output
19+
20+
# Clean up after ourselves
21+
rm -R dist-newstyle
22+
rm -R _build/MAlonzo/Code/

0 commit comments

Comments
 (0)