diff --git a/src/runtime/haskell/pgf2.cabal b/src/runtime/haskell/pgf2.cabal index db7babb2f..2b1eaef4f 100644 --- a/src/runtime/haskell/pgf2.cabal +++ b/src/runtime/haskell/pgf2.cabal @@ -25,5 +25,10 @@ library extra-libraries: pgf cc-options: -std=c99 - default-language: Haskell2010 c-sources: utils.c + +test-suite basic + type: exitcode-stdio-1.0 + main-is: tests/basic.hs + default-language: Haskell2010 + build-depends: base, HUnit, pgf2 diff --git a/src/runtime/haskell/tests/basic.gf b/src/runtime/haskell/tests/basic.gf new file mode 100644 index 000000000..e54b628cc --- /dev/null +++ b/src/runtime/haskell/tests/basic.gf @@ -0,0 +1,8 @@ +abstract basic = { + +cat N ; + +fun Z : N ; + S : N -> N ; + +} diff --git a/src/runtime/haskell/tests/basic.hs b/src/runtime/haskell/tests/basic.hs new file mode 100644 index 000000000..bbb7b6c69 --- /dev/null +++ b/src/runtime/haskell/tests/basic.hs @@ -0,0 +1,6 @@ +import Test.HUnit +import PGF2 + +main = do + gr <- readPGF "tests/basic.pgf" + runTestTTAndExit (TestCase (assertEqual "abstract names" "basic" (abstractName gr))) diff --git a/src/runtime/haskell/tests/basic.pgf b/src/runtime/haskell/tests/basic.pgf new file mode 100644 index 000000000..410358375 Binary files /dev/null and b/src/runtime/haskell/tests/basic.pgf differ