summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-haskell/test-framework-th
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-haskell/test-framework-th')
-rw-r--r--dev-haskell/test-framework-th/Manifest1
-rw-r--r--dev-haskell/test-framework-th/metadata.xml54
-rw-r--r--dev-haskell/test-framework-th/test-framework-th-0.2.4.ebuild27
3 files changed, 82 insertions, 0 deletions
diff --git a/dev-haskell/test-framework-th/Manifest b/dev-haskell/test-framework-th/Manifest
new file mode 100644
index 000000000000..b368dbb87366
--- /dev/null
+++ b/dev-haskell/test-framework-th/Manifest
@@ -0,0 +1 @@
+DIST test-framework-th-0.2.4.tar.gz 2977 SHA256 8b780d9e3edd8d91e24f72d9fa1f80420e52959428ad7c22d0694901a43f9c8a SHA512 0e8b6898eb7bf481bafb0c9ff9caa615dbf768e538e26b15ab899c5c9a1ad6bd6ed76ef93cf9a823706046d41f49fbb0cbe660bf846e59a608a0e5d21e89686b WHIRLPOOL 37718161ec8be33a7dda311beb4de15eeecec2712bdfd16c848830149d4aec5df47f0d402d9967b0f4552eb1602277efe2a6d7f7d2279063dbd9986501155dc5
diff --git a/dev-haskell/test-framework-th/metadata.xml b/dev-haskell/test-framework-th/metadata.xml
new file mode 100644
index 000000000000..03be45ce38cf
--- /dev/null
+++ b/dev-haskell/test-framework-th/metadata.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>haskell</herd>
+ <longdescription>
+ @test-framework-th@ contains two interesting functions: @defaultMainGenerator@ and @testGroupGenerator@.
+
+ @defaultMainGenerator@ will extract all functions beginning with case_ or prop_ in the module and put them in a testGroup.
+
+ &gt; -- file SomeModule.hs
+ &gt; ( -# LANGUAGE TemplateHaskell #- )
+ &gt; module SomeModule where
+ &gt; import Test.Framework.TH
+ &gt; import Test.Framework
+ &gt; import Test.HUnit
+ &gt; import Test.Framework.Providers.HUnit
+ &gt; import Test.Framework.Providers.QuickCheck2
+ &gt;
+ &gt; -- observe this line!
+ &gt; main = $(defaultMainGenerator)
+ &gt; case_1 = do 1 @=? 1
+ &gt; case_2 = do 2 @=? 2
+ &gt; prop_reverse xs = reverse (reverse xs) == xs
+ &gt; where types = xs::[Int]
+
+ is the same as
+
+ &gt; -- file SomeModule.hs
+ &gt; ( -# LANGUAGE TemplateHaskell #- )
+ &gt; module SomeModule where
+ &gt; import Test.Framework.TH
+ &gt; import Test.Framework
+ &gt; import Test.HUnit
+ &gt; import Test.Framework.Providers.HUnit
+ &gt; import Test.Framework.Providers.QuickCheck2
+ &gt;
+ &gt; -- observe this line!
+ &gt; main =
+ &gt; defaultMain [
+ &gt; testGroup "SomeModule" [ testCase "1" case_1, testCase "2" case_2, testProperty "reverse" prop_reverse]
+ &gt; ]
+ &gt;
+ &gt; case_1 = do 1 @=? 1
+ &gt; case_2 = do 2 @=? 2
+ &gt; prop_reverse xs = reverse (reverse xs) == xs
+ &gt; where types = xs::[Int]
+
+ @testGroupGenerator@ is like @defaultMainGenerator@ but without @defaultMain@. It is useful if you need a function for the testgroup
+ (e.g. if you want to be able to call the testgroup from another module).
+ </longdescription>
+ <upstream>
+ <remote-id type="github">finnsson/test-generator</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-haskell/test-framework-th/test-framework-th-0.2.4.ebuild b/dev-haskell/test-framework-th/test-framework-th-0.2.4.ebuild
new file mode 100644
index 000000000000..087da1b09baa
--- /dev/null
+++ b/dev-haskell/test-framework-th/test-framework-th-0.2.4.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# ebuild generated by hackport 0.3.1.9999
+
+CABAL_FEATURES="lib profile haddock hoogle hscolour"
+inherit haskell-cabal
+
+DESCRIPTION="Automagically generate the HUnit- and Quickcheck-bulk-code using Template Haskell"
+HOMEPAGE="http://github.com/finnsson/test-generator"
+SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-haskell/haskell-src-exts:=[profile?]
+ >=dev-haskell/language-haskell-extract-0.2:=[profile?]
+ dev-haskell/regex-posix:=[profile?]
+ dev-haskell/test-framework:=[profile?]
+ >=dev-lang/ghc-6.10.4:="
+DEPEND="${RDEPEND}
+ >=dev-haskell/cabal-1.6"