@@ -1,16 +1,11 @@
4−This directory contains the tests for the Text library.
6−There are two categories of tests: functional tests (including QuickCheck
7−properties) and benchmarks.
1+Tests and benchmarks
9Prerequisites
4Prerequisites
10-------------
5-------------
12−To run these tests, you will need the test data from one of the following
7+To run the tests and benchmarks, you will need the test data, which
13−locations:
8+you can clone from one of the following locations:
15* Mercurial master repository:
10* Mercurial master repository:
16 [bitbucket.org/bos/text-test-data](https://bitbucket.org/bos/text-test-data)
11 [bitbucket.org/bos/text-test-data](https://bitbucket.org/bos/text-test-data)
@@ -18,10 +13,10 @@ locations:
18* Git mirror repository:
13* Git mirror repository:
19 [github.com/bos/text-test-data](https://github.com/bos/text-test-data)
14 [github.com/bos/text-test-data](https://github.com/bos/text-test-data)
21−You should clone that repository to the same directory as this `README` file
16+You should clone that repository into the `tests` subdirectory (your
22−(your clone must be named `text-test-data` locally), then run `make -C
17+clone must be named `text-test-data` locally), then run `make -C
23−text-test-data` to uncompress the test files. Many tests will fail if the
18+tests/text-test-data` to uncompress the test files. Many tests and
24−test files are missing.
19+benchmarks will fail if the test files are missing.
26Functional tests
21Functional tests
27----------------
22----------------
@@ -29,10 +24,10 @@ Functional tests
29The functional tests are located in the `tests` subdirectory. An overview of
24The functional tests are located in the `tests` subdirectory. An overview of
30what's in that directory:
25what's in that directory:
32− scripts Various utility scripts
33− src Source files of the testing code
34− text-tests.cabal Cabal file which compiles all benchmarks
35 Makefile Has targets for common tasks
27 Makefile Has targets for common tasks
28+ Tests Source files of the testing code
29+ scripts Various utility scripts
30+ text-tests.cabal Cabal file that compiles all benchmarks
37The `text-tests.cabal` builds:
32The `text-tests.cabal` builds:
@@ -48,11 +43,11 @@ Benchmarks
48The benchmarks are located in the `benchmarks` subdirectory. An overview of
43The benchmarks are located in the `benchmarks` subdirectory. An overview of
49what's in that directory:
44what's in that directory:
46+ Makefile Has targets for common tasks
47+ haskell Source files of the haskell benchmarks
51 python Python implementations of some benchmarks
48 python Python implementations of some benchmarks
52 ruby Ruby implementations of some benchmarks
49 ruby Ruby implementations of some benchmarks
53− src Source files of the haskell benchmarks
54 text-benchmarks.cabal Cabal file which compiles all benchmarks
50 text-benchmarks.cabal Cabal file which compiles all benchmarks
55− Makefile Has targets for common tasks
57To compile the benchmarks, navigate to the `benchmarks` subdirectory and run
52To compile the benchmarks, navigate to the `benchmarks` subdirectory and run
58`cabal configure && cabal build`. Then, you can run the benchmarks using:
53`cabal configure && cabal build`. Then, you can run the benchmarks using:
@@ -65,4 +60,4 @@ run them all. Instead, use the `-l` flag to get a list of benchmarks:
65 ./dist/build/benchmarks/benchmarks
60 ./dist/build/benchmarks/benchmarks
67And run the ones you want to inspect. If you want to configure the benchmarks
62And run the ones you want to inspect. If you want to configure the benchmarks
68−further, the exact parameters can be changed in `src/Data/Text/Benchmarks.hs`.
63+further, the exact parameters can be changed in `Benchmarks.hs`.