on master help sign in
Reorganize tests subtree
a827b2eBryan O'Sullivan
.hgignore+1−1
@@ -1,4 +1,4 @@
1−^(?:dist|benchmarks/dist|tests/tests/dist)$
1+^(?:dist|benchmarks/dist|tests/dist)$
2^benchmarks/.*\.txt$
2^benchmarks/.*\.txt$
3^tests/text-testdata.tar.bz2$
3^tests/text-testdata.tar.bz2$
4^tests/(?:\.hpc|bm|qc|qc-hpc|stdio-hpc|text/test)$
4^tests/(?:\.hpc|bm|qc|qc-hpc|stdio-hpc|text/test)$
tests/tests/.ghci → tests/.ghcirenamed

The content is the same.

tests/tests/Makefile → tests/Makefilerenamed

The content is the same.

tests/tests/src/Data/Text/Tests.hs → tests/Tests.hsrenamed+2−2
@@ -6,8 +6,8 @@ module Main
6
6
7import Test.Framework (defaultMain)
7import Test.Framework (defaultMain)
8
8
9−import qualified Data.Text.Tests.Properties as Properties
9+import qualified Tests.Properties as Properties
10−import qualified Data.Text.Tests.Regressions as Regressions
10+import qualified Tests.Regressions as Regressions
11
11
12main :: IO ()
12main :: IO ()
13main = defaultMain [Properties.tests, Regressions.tests]
13main = defaultMain [Properties.tests, Regressions.tests]
tests/tests/src/Data/Text/Tests/IO.hs → tests/Tests/IO.hsrenamed

The content is the same.

tests/tests/src/Data/Text/Tests/Properties.hs → tests/Tests/Properties.hsrenamed+4−4
@@ -4,7 +4,7 @@
4 ScopedTypeVariables, TypeSynonymInstances, CPP #-}
4 ScopedTypeVariables, TypeSynonymInstances, CPP #-}
5{-# OPTIONS_GHC -fno-enable-rewrite-rules #-}
5{-# OPTIONS_GHC -fno-enable-rewrite-rules #-}
6{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
6{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
7−module Data.Text.Tests.Properties
7+module Tests.Properties
8 (
8 (
9 tests
9 tests
10 ) where
10 ) where
@@ -46,9 +46,9 @@ import qualified Data.Text.Lazy.Search as S (indices)
46import qualified Data.Text.UnsafeShift as U
46import qualified Data.Text.UnsafeShift as U
47import qualified System.IO as IO
47import qualified System.IO as IO
48
48
49−import Data.Text.Tests.QuickCheckUtils
49+import Tests.QuickCheckUtils
50−import Data.Text.Tests.Utils
50+import Tests.Utils
51−import qualified Data.Text.Tests.SlowFunctions as Slow
51+import qualified Tests.SlowFunctions as Slow
52
52
53t_pack_unpack = (T.unpack . T.pack) `eq` id
53t_pack_unpack = (T.unpack . T.pack) `eq` id
54tl_pack_unpack = (TL.unpack . TL.pack) `eq` id
54tl_pack_unpack = (TL.unpack . TL.pack) `eq` id
tests/tests/src/Data/Text/Tests/QuickCheckUtils.hs → tests/Tests/QuickCheckUtils.hsrenamed+3−3
@@ -1,10 +1,10 @@
1-- | This module provides quickcheck utilities, e.g. arbitrary and show
1-- | This module provides quickcheck utilities, e.g. arbitrary and show
2-- instances, and comparison functions, so we can focus on the actual properties
2-- instances, and comparison functions, so we can focus on the actual properties
3−-- in the 'Data.Text.Tests.Properties' module.
3+-- in the 'Tests.Properties' module.
4--
4--
5{-# LANGUAGE CPP, FlexibleInstances, TypeSynonymInstances #-}
5{-# LANGUAGE CPP, FlexibleInstances, TypeSynonymInstances #-}
6{-# OPTIONS_GHC -fno-warn-orphans #-}
6{-# OPTIONS_GHC -fno-warn-orphans #-}
7−module Data.Text.Tests.QuickCheckUtils
7+module Tests.QuickCheckUtils
8 (
8 (
9 genUnicode
9 genUnicode
10 , unsquare
10 , unsquare
@@ -50,7 +50,7 @@ import qualified Data.Text.Lazy.Fusion as TLF
50import qualified Data.Text.Lazy.Internal as TL
50import qualified Data.Text.Lazy.Internal as TL
51import qualified System.IO as IO
51import qualified System.IO as IO
52
52
53−import Data.Text.Tests.Utils
53+import Tests.Utils
54
54
55instance Random I16 where
55instance Random I16 where
56 randomR = integralRandomR
56 randomR = integralRandomR
tests/tests/src/Data/Text/Tests/Regressions.hs → tests/Tests/Regressions.hsrenamed+2−2
@@ -1,7 +1,7 @@
1-- | Regression tests for specific bugs.
1-- | Regression tests for specific bugs.
2--
2--
3{-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-}
3{-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-}
4−module Data.Text.Tests.Regressions
4+module Tests.Regressions
5 (
5 (
6 tests
6 tests
7 ) where
7 ) where
@@ -18,7 +18,7 @@ import qualified Data.Text.Lazy.Encoding as LE
18import qualified Test.Framework as F
18import qualified Test.Framework as F
19import qualified Test.Framework.Providers.HUnit as F
19import qualified Test.Framework.Providers.HUnit as F
20
20
21−import Data.Text.Tests.Utils (withTempFile)
21+import Tests.Utils (withTempFile)
22
22
23-- Reported by Michael Snoyman: UTF-8 encoding a large lazy bytestring
23-- Reported by Michael Snoyman: UTF-8 encoding a large lazy bytestring
24-- caused either a segfault or attempt to allocate a negative number
24-- caused either a segfault or attempt to allocate a negative number
tests/tests/src/Data/Text/Tests/SlowFunctions.hs → tests/Tests/SlowFunctions.hsrenamed+1−1
@@ -1,5 +1,5 @@
1{-# LANGUAGE BangPatterns #-}
1{-# LANGUAGE BangPatterns #-}
2−module Data.Text.Tests.SlowFunctions
2+module Tests.SlowFunctions
3 (
3 (
4 indices
4 indices
5 , splitOn
5 , splitOn
tests/tests/src/Data/Text/Tests/Utils.hs → tests/Tests/Utils.hsrenamed+1−1
@@ -1,7 +1,7 @@
1-- | Miscellaneous testing utilities
1-- | Miscellaneous testing utilities
2--
2--
3{-# LANGUAGE ScopedTypeVariables #-}
3{-# LANGUAGE ScopedTypeVariables #-}
4−module Data.Text.Tests.Utils
4+module Tests.Utils
5 (
5 (
6 (=^=)
6 (=^=)
7 , withRedirect
7 , withRedirect
tests/tests/scripts/cover-stdio.sh → tests/scripts/cover-stdio.shrenamed

The content is the same.

tests/tests/text-tests.cabal → tests/text-tests.cabalrenamed+21−23
@@ -4,7 +4,7 @@ synopsis: Functional tests for the text package
4description: Functional tests for the text package
4description: Functional tests for the text package
5homepage: https://bitbucket.org/bos/text
5homepage: https://bitbucket.org/bos/text
6license: BSD3
6license: BSD3
7−license-file: ../../LICENSE
7+license-file: ../LICENSE
8author: Jasper Van der Jeugt <jaspervdj@gmail.com>,
8author: Jasper Van der Jeugt <jaspervdj@gmail.com>,
9 Bryan O'Sullivan <bos@serpentine.com>,
9 Bryan O'Sullivan <bos@serpentine.com>,
10 Tom Harper <rtomharper@googlemail.com>,
10 Tom Harper <rtomharper@googlemail.com>,
@@ -20,8 +20,7 @@ flag hpc
20 default: False
20 default: False
21
21
22executable text-tests
22executable text-tests
23− hs-source-dirs: src
24− main-is: Data/Text/Tests.hs
23+ main-is: Tests.hs
25
24
26 ghc-options:
25 ghc-options:
27 -Wall -threaded -O0 -rtsopts
26 -Wall -threaded -O0 -rtsopts
@@ -35,21 +34,20 @@ executable text-tests
35 -DHAVE_DEEPSEQ
34 -DHAVE_DEEPSEQ
36
35
37 build-depends:
36 build-depends:
38− text-tests,
37+ HUnit >= 1.2,
38+ QuickCheck >= 2.4,
39− base >= 4 && < 5,
39+ base == 4.*,
40− bytestring >= 0.9,
40+ bytestring,
41− deepseq >= 1.1,
41+ deepseq,
42− directory >= 1.1 && < 1.2,
42+ directory,
43− random >= 1.0 && < 1.1,
43+ random,
44− QuickCheck >= 2.4 && < 2.5,
45− HUnit >= 1.2 && < 1.3,
46− test-framework >= 0.4 && < 0.5,
44+ test-framework >= 0.4,
47− test-framework-quickcheck2 >= 0.2 && < 0.3,
48− test-framework-hunit >= 0.2 && < 0.3
45+ test-framework-hunit >= 0.2,
46+ test-framework-quickcheck2 >= 0.2,
47+ text-tests
49
48
50executable text-tests-stdio
49executable text-tests-stdio
51− hs-source-dirs: src
52− main-is: Data/Text/Tests/IO.hs
50+ main-is: Tests/IO.hs
53
51
54 ghc-options:
52 ghc-options:
55 -Wall -threaded -rtsopts
53 -Wall -threaded -rtsopts
@@ -64,8 +62,8 @@ executable text-tests-stdio
64 base >= 4 && < 5
62 base >= 4 && < 5
65
63
66library
64library
67− hs-source-dirs: ../..
65+ hs-source-dirs: ..
68− c-sources: ../../cbits/cbits.c
66+ c-sources: ../cbits/cbits.c
69 exposed-modules:
67 exposed-modules:
70 Data.Text
68 Data.Text
71 Data.Text.Array
69 Data.Text.Array
@@ -117,8 +115,8 @@ library
117
115
118 build-depends:
116 build-depends:
119 array,
117 array,
120− base >= 4 && < 5,
118+ base == 4.*,
121− bytestring >= 0.9,
119+ bytestring,
122− deepseq >= 1.1,
120+ deepseq,
121+ ghc-prim,
123− integer-gmp >= 0.2 && < 0.3,
122+ integer-gmp
124− ghc-prim >= 0.2 && < 0.3
text.cabal+6−6
@@ -61,12 +61,12 @@ extra-source-files:
61 benchmarks/text-benchmarks.cabal
61 benchmarks/text-benchmarks.cabal
62 scripts/*.hs
62 scripts/*.hs
63 tests/README.markdown
63 tests/README.markdown
64− tests/tests/.ghci
64+ tests/.ghci
65− tests/tests/Makefile
65+ tests/Makefile
66− tests/tests/scripts/*.sh
66+ tests/scripts/*.sh
67− tests/tests/src/Data/Text/*.hs
67+ tests/src/Data/Text/*.hs
68− tests/tests/src/Data/Text/Tests/*.hs
68+ tests/src/Data/Text/Tests/*.hs
69− tests/tests/text-tests.cabal
69+ tests/text-tests.cabal
70
70
71flag developer
71flag developer
72 description: operate in developer mode
72 description: operate in developer mode