[Pkg-haskell-commits] [SCM] haskell-testpack branch, master, updated. debian/1.0.2-1-4-gb0d6b36
John Goerzen
jgoerzen at complete.org
Fri Apr 23 14:42:59 UTC 2010
The following commit has been merged in the master branch:
commit a9917dd97f13ad13d21fc748a060b999b69497bd
Author: John Goerzen <jgoerzen at complete.org>
Date: Thu Oct 7 07:26:14 2004 +0100
Added basic test infrastructure
Keywords:
(jgoerzen at complete.org--projects/missingh--head--1.0--patch-35)
diff --git a/ChangeLog b/ChangeLog
index 2b9f6ce..352aa12 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,24 @@
# arch-tag: automatic-ChangeLog--jgoerzen at complete.org--projects/missingh--head--1.0
#
+2004-10-07 01:26:14 GMT John Goerzen <jgoerzen at complete.org> patch-35
+
+ Summary:
+ Added basic test infrastructure
+ Revision:
+ missingh--head--1.0--patch-35
+
+
+ new files:
+ testsrc/.arch-ids/=id testsrc/Tests.hs testsrc/runtests.hs
+
+ modified files:
+ ChangeLog Makefile debian/control
+
+ new directories:
+ testsrc testsrc/.arch-ids
+
+
2004-10-07 01:04:20 GMT John Goerzen <jgoerzen at complete.org> patch-34
Summary:
diff --git a/Makefile b/Makefile
index 8c40398..97c6bc3 100644
--- a/Makefile
+++ b/Makefile
@@ -38,5 +38,16 @@ doc:
clean:
-./setup clean
-rm -rf html `find . -name "*.o"` `find . -name "*.hi"` \
- `find . -name "*~"` *.a setup dist
+ `find . -name "*~"` *.a setup dist testsrc/runtests
+
+testsrc/runtests: all $(shell find testsrc -name "*.hs")
+ ghc6 -package HUnit --make -o testsrc/runtests -itestsrc -ilibsrc testsrc/runtests.hs
+
+test-ghc6: testsrc/runtests
+ testsrc/runtests
+
+test-hugs:
+ runhugs -P:$(PWD)/libsrc:$(PWD)/testsrc testsrc/runtests.hs
+
+test: test-ghc6 test-hugs
diff --git a/debian/control b/debian/control
index 189f016..fe0d714 100644
--- a/debian/control
+++ b/debian/control
@@ -1,7 +1,7 @@
Source: missingh
Priority: optional
Maintainer: John Goerzen <jgoerzen at complete.org>
-Build-Depends: debhelper (>= 4.0.0), ghc6 (>= 6.2.1), ghc6 (<< 6.2.2), ssed
+Build-Depends: debhelper (>= 4.0.0), ghc6 (>= 6.2.1), ghc6 (<< 6.2.2)
Build-Depends-Indep: debhelper (>= 4.0.0), haddock
Standards-Version: 3.6.1
Section: devel
diff --git a/testsrc/Tests.hs b/testsrc/Tests.hs
new file mode 100644
index 0000000..d323396
--- /dev/null
+++ b/testsrc/Tests.hs
@@ -0,0 +1,27 @@
+{- arch-tag: Tests main file
+Copyright (C) 2004 John Goerzen <jgoerzen at complete.org>
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+-}
+
+module Tests(tests) where
+
+import HUnit
+
+test1 = TestCase ("x" @=? "x")
+
+tests = TestList [TestLabel "test1" test1]
+
+
diff --git a/testsrc/runtests.hs b/testsrc/runtests.hs
new file mode 100644
index 0000000..07e3b72
--- /dev/null
+++ b/testsrc/runtests.hs
@@ -0,0 +1,25 @@
+{- arch-tag: Test runner
+Copyright (C) 2004 John Goerzen <jgoerzen at complete.org>
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+-}
+
+module Main where
+
+import HUnit
+import Tests
+
+main = runTestTT tests
+
--
haskell-testpack
More information about the Pkg-haskell-commits
mailing list