diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,131 @@
+# Builds and tests this Haskell project on "GitHub Actions"
+#
+# 2021  Rudy Matela
+#
+# some docs: https://github.com/haskell/actions/tree/main/setup
+name: build
+on: [push]
+jobs:
+  build-and-test:
+    runs-on: ubuntu-latest
+    steps:
+
+      - name: Cache ~/.cabal/packages
+        uses: actions/cache@v2
+        with:
+          path: ~/.cabal/packages
+          key:          v1-${{ runner.os }}-cabal-packages-${{ hashFiles('hello.cabal') }}
+          restore-keys: v1-${{ runner.os }}-cabal-packages-
+
+      - name: Cache ~/.cabal and ~/.ghc
+        uses: actions/cache@v2
+        with:
+          path: |
+            ~/.cabal
+            !~/.cabal/packages
+            ~/.ghc
+          key:          v1-${{ runner.os }}-cabal-ghc-latest-${{ hashFiles('hello.cabal') }}
+          restore-keys: v1-${{ runner.os }}-cabal-ghc-latest-
+
+      - run: du -hd3 ~/.cabal ~/.ghc || true
+
+      - run: haddock --version || sudo apt-get install ghc-haddock
+      - run: ghc   --version
+      - run: cabal --version
+
+      - name: Check out repository
+        uses: actions/checkout@v2
+
+      - run: cabal update
+      - run: make install-dependencies
+
+      - run: make
+      - run: make test
+      - run: make haddock
+      - run: make test-sdist
+      - run: make test-via-cabal
+
+
+  test-with-ghc:
+    strategy:
+      matrix:
+        ghc:
+          - '9.0'
+          - '8.10'
+          - '8.8'
+          - '8.6'
+          - '8.4'
+          - '8.2'
+          - '8.0'
+          - '7.10'
+          - '7.8'
+    runs-on: ubuntu-latest
+    needs: build-and-test
+    container: haskell:${{ matrix.ghc }}
+    steps:
+      - name: Cache ~/.cabal/packages
+        uses: actions/cache@v2
+        with:
+          path: ~/.cabal/packages
+          key:          v1-${{ runner.os }}-cabal-packages-${{ hashFiles('hello.cabal') }}
+          restore-keys: v1-${{ runner.os }}-cabal-packages-
+
+      - name: Cache ~/.cabal and ~/.ghc
+        uses: actions/cache@v2
+        with:
+          path: |
+            ~/.cabal
+            !~/.cabal/packages
+            ~/.ghc
+          key:          v1-${{ runner.os }}-cabal-ghc-${{ matrix.ghc }}-${{ hashFiles('hello.cabal') }}
+          restore-keys: v1-${{ runner.os }}-cabal-ghc-${{ matrix.ghc }}-
+
+      - run: du -hd3 ~/.cabal ~/.ghc || true
+
+      - run: make --version || rm /etc/apt/sources.list.d/*.list # faster update
+      - run: make --version || apt-get update
+      - run: make --version || apt-get install make
+
+      - run: ghc   --version
+      - run: cabal --version
+
+      - name: Check out repository
+        uses: actions/checkout@v2
+
+      - run: cabal update
+      - run: make install-dependencies
+
+      - run: make
+      - run: make test
+      - run: make haddock
+      - run: make test-sdist
+      - run: make test-via-cabal
+
+  test-with-stack:
+    runs-on: ubuntu-latest
+    needs: build-and-test
+    steps:
+      - name: Setup Haskell's GHC and Cabal as required by current Stackage LTS
+        uses: haskell/actions/setup@v1
+        with: # lts-17.9
+          ghc-version: '8.10.4'
+          cabal-version: '3.2'
+
+      - uses: actions/cache@v2
+        with:
+          path: ~/.stack
+          key:          v1-${{ runner.os }}-stack-${{ hashFiles('stack.yaml') }}
+          restore-keys: v1-${{ runner.os }}-stack-
+
+      - name: Check out repository
+        uses: actions/checkout@v2
+      - run: make test-via-stack
+
+  test-with-hugs:
+    runs-on: ubuntu-latest
+    needs: build-and-test
+    steps:
+      - run: sudo apt-get install hugs
+      - name: Check out repository
+        uses: actions/checkout@v2
+      - run: make hugs-test
diff --git a/.gitignore b/.gitignore
--- a/.gitignore
+++ b/.gitignore
@@ -18,6 +18,7 @@
 **/.cabal-sandbox
 **/cabal.sandbox.config
 **/dist/
+dist-newstyle
 
 # hasktags
 **/idx/
@@ -29,10 +30,10 @@
 mk/toplibs
 bench/examples
 bench/speculate
-tests/test-main
-tests/test-number
-tests/test-prop
-tests/test-quotient
-tests/test-spec
-tests/test-unit
-tests/test-scientific
+test/main
+test/number
+test/prop
+test/quotient
+test/spec
+test/unit
+test/scientific
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
--- a/.travis.yml
+++ /dev/null
@@ -1,82 +0,0 @@
-# .travis.yml file for percent-format
-#
-# Copyright:   (c) 2018 Rudy Matela
-# License:     3-Clause BSD  (see the file LICENSE)
-# Maintainer:  Rudy Matela <rudy@matela.com.br>
-
-language: c  # not really
-
-notifications:
-  email:
-    on_failure: change
-
-sudo: false
-
-cache:
-  directories:
-  - $HOME/.ghc
-  - $HOME/.cabal
-  - $HOME/.stack
-
-before_install:
-- export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
-- ghc --version
-- cabal --version
-- rm -f ~/.cabal/config && cabal update
-# Download and unpack the stack executable
-# "Once Travis whitelists the stack.dev files," simply include stack in the
-# addons section. -- https://docs.haskellstack.org/en/stable/travis_ci/
-- mkdir -p ~/.local/bin
-- export PATH=$HOME/.local/bin:$PATH
-- travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
-- stack config set system-ghc --global true
-- stack --version
-- cabal install leancheck
-
-script:
-- make && make test && make haddock HADDOCKFLAGS=
-- make test-sdist
-- cabal test
-- stack --no-terminal --skip-ghc-check test
-
-matrix:
-  allow_failures:
-  - ghc: 'head'
-  include:
-  - ghc: 'head'
-    env:                   GHCVER=head         CABALVER=head
-    addons: {apt: {packages: [ghc-head,   cabal-install-head], sources: hvr-ghc}}
-  - ghc: '8.4'
-    env:                   GHCVER=8.4.2        CABALVER=2.2
-    addons: {apt: {packages: [ghc-8.4.2,  cabal-install-2.2],  sources: hvr-ghc}}
-  - ghc: '8.2'
-    env:                   GHCVER=8.2.2        CABALVER=2.0
-    addons: {apt: {packages: [ghc-8.2.2,  cabal-install-2.0],  sources: hvr-ghc}}
-  - ghc: '8.0'
-    env:                   GHCVER=8.0.2        CABALVER=1.24
-    addons: {apt: {packages: [ghc-8.0.2,  cabal-install-1.24], sources: hvr-ghc}}
-  - ghc: '7.10'
-    env:                   GHCVER=7.10.3       CABALVER=1.22
-    addons: {apt: {packages: [ghc-7.10.3, cabal-install-1.22], sources: hvr-ghc}}
-  # we only support stack with GHC >= 7.10
-  - ghc: '7.8'
-    env:                   GHCVER=7.8.4        CABALVER=1.18
-    addons: {apt: {packages: [ghc-7.8.4,  cabal-install-1.18], sources: hvr-ghc}}
-    before_install:
-    - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
-    - ghc --version
-    - cabal --version
-    - rm -f ~/.cabal/config && cabal update
-    - cabal install Cabal==1.18.*
-    - cabal install leancheck
-    script:
-    - make && make test && make haddock HADDOCKFLAGS=
-    - cabal test
-# Hugs is not a GHC version.  But this is how travis can handle it.
-  - ghc: 'hugs'
-    env:                   GHCVER=hugs
-    addons: {apt: {packages: [hugs]}}
-    before_install:
-    - echo ":version" | hugs
-    script:
-    - make hugs-test
diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -4,31 +4,33 @@
 # License:     3-Clause BSD  (see the file LICENSE)
 # Maintainer:  Rudy Matela <rudy@matela.com.br>
 TESTS = \
-  tests/test-spec \
-  tests/test-unit \
-  tests/test-number \
-  tests/test-scientific \
-  tests/test-quotient \
-  tests/test-prop
+  test/spec \
+  test/unit \
+  test/number \
+  test/scientific \
+  test/quotient \
+  test/prop
 EGS =
 BENCHS = bench/speculate
-GHCIMPORTDIRS = src:tests
+GHCIMPORTDIRS = src:test
 GHCFLAGS = -O2 $(shell grep -q "Arch Linux" /etc/lsb-release && echo -dynamic)
-HADDOCKFLAGS = --no-print-missing-docs
-HUGSIMPORTDIRS = .:./src:./tests:/usr/lib/hugs/packages/*
+HUGSIMPORTDIRS = .:./src:./test:/usr/lib/hugs/packages/*
+INSTALL_DEPS = leancheck
 
 all: mk/toplibs $(TESTS)
 
 test: $(patsubst %,%.test,$(TESTS)) diff-test
 
 test-via-cabal:
-	cabal clean  &&  cabal configure --enable-tests  && cabal test
+	cabal configure --enable-tests --enable-benchmarks --ghc-options="$(GHCFLAGS) -O0"
+	cabal build
+	cabal test unit
 
 test-via-stack:
-	stack test
+	stack test percent-format:test:unit --ghc-options="$(GHCFLAGS) -O0" --system-ghc --no-install-ghc --no-terminal
 
 test-sdist:
-	./tests/test-sdist
+	./test/sdist
 
 legacy-test: # needs ghc-8.0 .. ghc-7.8 installed as such
 	make clean  &&  make test GHC=ghc-8.2  GHCFLAGS="-Werror -dynamic"
@@ -75,74 +77,74 @@
 hugs: mk/All.hugs
 
 hugs-test: \
-  tests/test-spec.runhugs \
-  tests/test-unit.runhugs \
-  tests/test-number.runhugs \
-  tests/test-scientific.runhugs
+  test/spec.runhugs \
+  test/unit.runhugs \
+  test/number.runhugs \
+  test/scientific.runhugs
 
 diff-test: examples-diff-test
 
 update-diff-test: update-examples-diff-test
 
 examples-diff-test: bench/examples
-	./bench/examples             | diff -rud tests/diff/examples.out         -
-	./bench/examples "%r"        | diff -rud tests/diff/examples-r.out       -
-	./bench/examples "%6r"       | diff -rud tests/diff/examples-6r.out      -
-	./bench/examples "%-6r"      | diff -rud tests/diff/examples--6r.out     -
-	./bench/examples "%s"        | diff -rud tests/diff/examples-s.out       -
-	./bench/examples "%6s"       | diff -rud tests/diff/examples-6s.out      -
-	./bench/examples "%-6s"      | diff -rud tests/diff/examples--6s.out     -
-	./bench/examples "%i"        | diff -rud tests/diff/examples-i.out       -
-	./bench/examples "%3i"       | diff -rud tests/diff/examples-3i.out      -
-	./bench/examples "%03i"      | diff -rud tests/diff/examples-03i.out     -
-	./bench/examples "%-3i"      | diff -rud tests/diff/examples--3i.out     -
-	./bench/examples "%+3i"      | diff -rud tests/diff/examples-+3i.out     -
-	./bench/examples "% 3i"      | diff -rud tests/diff/examples-_3i.out     -
-	./bench/examples "%f"        | diff -rud tests/diff/examples-f.out       -
-	./bench/examples "%5f"       | diff -rud tests/diff/examples-5f.out      -
-	./bench/examples "%+5f"      | diff -rud tests/diff/examples-+5f.out     -
-	./bench/examples "%-5f"      | diff -rud tests/diff/examples--5f.out     -
-	./bench/examples "%11.2f"    | diff -rud tests/diff/examples-11p2f.out   -
-	./bench/examples "%-11.2f"   | diff -rud tests/diff/examples--11p2f.out  -
-	./bench/examples "%c"        | diff -rud tests/diff/examples-c.out       -
-	./bench/examples "%2c"       | diff -rud tests/diff/examples-2c.out      -
-	./bench/examples "%b"        | diff -rud tests/diff/examples-b.out       -
-	./bench/examples "%o"        | diff -rud tests/diff/examples-o.out       -
-	./bench/examples "%x"        | diff -rud tests/diff/examples-x.out       -
-	./bench/examples "%X"        | diff -rud tests/diff/examples-X.out       -
-	./bench/examples "abc"       | diff -rud tests/diff/examples-abc.out     -
+	./bench/examples             | diff -rud test/diff/examples.out         -
+	./bench/examples "%r"        | diff -rud test/diff/examples-r.out       -
+	./bench/examples "%6r"       | diff -rud test/diff/examples-6r.out      -
+	./bench/examples "%-6r"      | diff -rud test/diff/examples--6r.out     -
+	./bench/examples "%s"        | diff -rud test/diff/examples-s.out       -
+	./bench/examples "%6s"       | diff -rud test/diff/examples-6s.out      -
+	./bench/examples "%-6s"      | diff -rud test/diff/examples--6s.out     -
+	./bench/examples "%i"        | diff -rud test/diff/examples-i.out       -
+	./bench/examples "%3i"       | diff -rud test/diff/examples-3i.out      -
+	./bench/examples "%03i"      | diff -rud test/diff/examples-03i.out     -
+	./bench/examples "%-3i"      | diff -rud test/diff/examples--3i.out     -
+	./bench/examples "%+3i"      | diff -rud test/diff/examples-+3i.out     -
+	./bench/examples "% 3i"      | diff -rud test/diff/examples-_3i.out     -
+	./bench/examples "%f"        | diff -rud test/diff/examples-f.out       -
+	./bench/examples "%5f"       | diff -rud test/diff/examples-5f.out      -
+	./bench/examples "%+5f"      | diff -rud test/diff/examples-+5f.out     -
+	./bench/examples "%-5f"      | diff -rud test/diff/examples--5f.out     -
+	./bench/examples "%11.2f"    | diff -rud test/diff/examples-11p2f.out   -
+	./bench/examples "%-11.2f"   | diff -rud test/diff/examples--11p2f.out  -
+	./bench/examples "%c"        | diff -rud test/diff/examples-c.out       -
+	./bench/examples "%2c"       | diff -rud test/diff/examples-2c.out      -
+	#./bench/examples "%b"        | diff -rud test/diff/examples-b.out       - # TODO: FIXME: infinite loop
+	#./bench/examples "%o"        | diff -rud test/diff/examples-o.out       - # TODO: FIXME: infinite loop
+	#./bench/examples "%x"        | diff -rud test/diff/examples-x.out       - # TODO: FIXME: infinite loop
+	#./bench/examples "%X"        | diff -rud test/diff/examples-X_.out      - # TODO: FIXME: infinite loop
+	./bench/examples "abc"       | diff -rud test/diff/examples-abc.out     -
 
 update-examples-diff-test: bench/examples
-	./bench/examples             > tests/diff/examples.out
-	./bench/examples "%r"        > tests/diff/examples-r.out
-	./bench/examples "%6r"       > tests/diff/examples-6r.out
-	./bench/examples "%-6r"      > tests/diff/examples--6r.out
-	./bench/examples "%s"        > tests/diff/examples-s.out
-	./bench/examples "%6s"       > tests/diff/examples-6s.out
-	./bench/examples "%-6s"      > tests/diff/examples--6s.out
-	./bench/examples "%i"        > tests/diff/examples-i.out
-	./bench/examples "%3i"       > tests/diff/examples-3i.out
-	./bench/examples "%03i"      > tests/diff/examples-03i.out
-	./bench/examples "%-3i"      > tests/diff/examples--3i.out
-	./bench/examples "%+3i"      > tests/diff/examples-+3i.out
-	./bench/examples "% 3i"      > tests/diff/examples-_3i.out
-	./bench/examples "%f"        > tests/diff/examples-f.out
-	./bench/examples "%5f"       > tests/diff/examples-5f.out
-	./bench/examples "%+5f"      > tests/diff/examples-+5f.out
-	./bench/examples "%-5f"      > tests/diff/examples--5f.out
-	./bench/examples "%11.2f"    > tests/diff/examples-11p2f.out
-	./bench/examples "%-11.2f"   > tests/diff/examples--11p2f.out
-	./bench/examples "%c"        > tests/diff/examples-c.out
-	./bench/examples "%2c"       > tests/diff/examples-2c.out
-	./bench/examples "%b"        > tests/diff/examples-b.out
-	./bench/examples "%o"        > tests/diff/examples-o.out
-	./bench/examples "%x"        > tests/diff/examples-x.out
-	./bench/examples "%X"        > tests/diff/examples-X.out
-	./bench/examples "abc"       > tests/diff/examples-abc.out
+	./bench/examples             > test/diff/examples.out
+	./bench/examples "%r"        > test/diff/examples-r.out
+	./bench/examples "%6r"       > test/diff/examples-6r.out
+	./bench/examples "%-6r"      > test/diff/examples--6r.out
+	./bench/examples "%s"        > test/diff/examples-s.out
+	./bench/examples "%6s"       > test/diff/examples-6s.out
+	./bench/examples "%-6s"      > test/diff/examples--6s.out
+	./bench/examples "%i"        > test/diff/examples-i.out
+	./bench/examples "%3i"       > test/diff/examples-3i.out
+	./bench/examples "%03i"      > test/diff/examples-03i.out
+	./bench/examples "%-3i"      > test/diff/examples--3i.out
+	./bench/examples "%+3i"      > test/diff/examples-+3i.out
+	./bench/examples "% 3i"      > test/diff/examples-_3i.out
+	./bench/examples "%f"        > test/diff/examples-f.out
+	./bench/examples "%5f"       > test/diff/examples-5f.out
+	./bench/examples "%+5f"      > test/diff/examples-+5f.out
+	./bench/examples "%-5f"      > test/diff/examples--5f.out
+	./bench/examples "%11.2f"    > test/diff/examples-11p2f.out
+	./bench/examples "%-11.2f"   > test/diff/examples--11p2f.out
+	./bench/examples "%c"        > test/diff/examples-c.out
+	./bench/examples "%2c"       > test/diff/examples-2c.out
+	#./bench/examples "%b"        > test/diff/examples-b.out  # TODO: FIXME: infinite loop
+	#./bench/examples "%o"        > test/diff/examples-o.out  # TODO: FIXME: infinite loop
+	#./bench/examples "%x"        > test/diff/examples-x.out  # TODO: FIXME: infinite loop
+	#./bench/examples "%X"        > test/diff/examples-X_.out # TODO: FIXME: infinite loop
+	./bench/examples "abc"       > test/diff/examples-abc.out
 
 # NOTE: (very hacky!) the following target allows parallel compilation (-jN) of
 # eg and tests programs so long as they don't share dependencies _not_ stored
-# in src/ and tests/.  Runnable binaries should depend on mk/toplibs instead of
+# in src/ and test/.  Runnable binaries should depend on mk/toplibs instead of
 # actual Haskell source files
 mk/toplibs: mk/Toplibs.o
 	touch mk/toplibs
diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
@@ -1,8 +1,13 @@
 PercentFormat -- C-like printf-style string formatting for Haskell
 ==================================================================
 
+[![PercentFormat's Build Status][build-status]][build-log]
+[![PercentFormat on Hackage][hackage-version]][percent-format-on-hackage]
+[![PercentFormat on Stackage LTS][stackage-lts-badge]][percent-format-on-stackage-lts]
+[![PercentFormat on Stackage Nightly][stackage-nightly-badge]][percent-format-on-stackage-nightly]
+
 The `Text.PercentFormat` library provides printf-style string formatting.  It
-provides a `%` operator (as in Ruby or Python) and uses the old C-printf-style
+provides a [`%`] operator (as in Ruby or Python) and uses the old C-printf-style
 format you know and love.
 
 This library differs from `Text.Printf` in that it does not rely on custom
@@ -14,12 +19,12 @@
 	> "Hello %s!" -% "World"
 	"Hello World!"
 
-Formatting three values, tuple style:
+Formatting three values, tuple style, using [`-%%%`]:
 
 	> "load average: %1.2f %1.2f %1.2f" -%%% (0.00, 0.066, 0.11)
 	"load average: 0.00 0.07 0.11"
 
-Formatting three values, chain style:
+Formatting three values, chain style, using [`%`] and [`-%`]:
 
 	> "load average: %1.2f %1.2f %1.2f" % 0.00 % 0.066 -% 0.11
 	"load average: 0.00 0.07 0.11"
@@ -32,12 +37,12 @@
 	"memory usage: 13%"
 
 
-Percent signs are duplicated when using the `%` operator to allow chaining:
+Percent signs are duplicated when using the [`%`] operator to allow chaining:
 
 	> "percent sign: %s, memory usage: %i%%" % "%" % 87
 	"percent sign: %%, memory usage: 87%%"
 
-_Always_ use the `-%` operator when formatting the _last value_
+_Always_ use the [`-%`] operator when formatting the _last value_
 to remove duplicate `%` signs:
 
 	> "percent sign: %s, memory usage: %i%%" % "%" -% 87
@@ -47,3 +52,34 @@
 
 	> putStrLn $ "Hello %s!" -% "World"
 	Hello World!
+
+For more information and a detailed list of options, see [PercentFormat's
+Haddock Documentation].
+
+PercentFormat is a work in progress.  Any help or pull requests are welcome.
+See [PercentFormat's TO DO list] for ideas on how to contribute.
+
+
+Installing
+----------
+
+To install the latest PercentFormat version from Hackage, just run:
+
+	$ cabal update
+	$ cabal install percent-format
+
+
+[build-log]:    https://github.com/rudymatela/percent-format/actions/workflows/build.yml
+[build-status]: https://github.com/rudymatela/percent-format/actions/workflows/build.yml/badge.svg
+[hackage-version]: https://img.shields.io/hackage/v/percent-format.svg
+[percent-format-on-hackage]: https://hackage.haskell.org/package/percent-format
+[PercentFormat's Haddock Documentation]: https://hackage.haskell.org/package/percent-format/docs/Text-PercentFormat.html
+[`%`]: https://hackage.haskell.org/package/percent-format-0.0.1/docs/Text-PercentFormat.html#v:-37-
+[`-%`]: https://hackage.haskell.org/package/percent-format-0.0.1/docs/Text-PercentFormat.html#v:-45--37-
+[`-%%%`]: https://hackage.haskell.org/package/percent-format-0.0.1/docs/Text-PercentFormat.html#v:-45--37--37--37-
+[PercentFormat's TO DO list]: TODO.md
+[stackage-lts-badge]:                 http://stackage.org/package/percent-format/badge/lts
+[stackage-nightly-badge]:             http://stackage.org/package/percent-format/badge/nightly
+[percent-format-on-stackage]:         http://stackage.org/package/percent-format
+[percent-format-on-stackage-lts]:     http://stackage.org/lts/package/percent-format
+[percent-format-on-stackage-nightly]: http://stackage.org/nightly/package/percent-format
diff --git a/TODO.md b/TODO.md
--- a/TODO.md
+++ b/TODO.md
@@ -8,24 +8,22 @@
 * when `%i`/`%f`/etc argument is a number encoded in a string, parse the number
   and make it work;
 
-* add `%e`;
-
-* release percent-format package on Hackage;
-
-* add link to Haddock documentation on README;
+* add `%e` and `%E`;
 
 * add `%q` (see `tests/test-number.hs`);
 
 * sweep `TODO`s scattered through files;
 
+* interpret precision in `%r` as prec of showsPrec;
+
 * *maybe*: make "%l" for lists:
 
-    > "%l" % [1,2,3] -- regular
-    [1,2,3]
-    > "% l" % [1,2,3] -- add spaces
-    [1, 2, 3]
-    > "%\nl" % [1,2,3] -- add linebreaks
-    [ 1
-    , 2
-    , 3 ]
+        > "%l" % [1,2,3] -- regular
+        [1,2,3]
+        > "% l" % [1,2,3] -- add spaces
+        [1, 2, 3]
+        > "%\nl" % [1,2,3] -- add linebreaks
+        [ 1
+        , 2
+        , 3 ]
 
diff --git a/mk/Toplibs.hs b/mk/Toplibs.hs
--- a/mk/Toplibs.hs
+++ b/mk/Toplibs.hs
@@ -3,3 +3,4 @@
 
 import Text.PercentFormat ()
 import Text.PercentFormat.Spec ()
+import Test ()
diff --git a/mk/depend.mk b/mk/depend.mk
--- a/mk/depend.mk
+++ b/mk/depend.mk
@@ -23,6 +23,7 @@
   src/Text/PercentFormat.hs \
   mk/All.hs
 mk/Toplibs.o: \
+  test/Test.hs \
   src/Text/PercentFormat/Utils.hs \
   src/Text/PercentFormat/Spec.hs \
   src/Text/PercentFormat/Quotient.hs \
@@ -36,69 +37,72 @@
   src/Text/PercentFormat/Quotient.hs \
   src/Text/PercentFormat.hs
 src/Text/PercentFormat/Quotient.o: \
+  src/Text/PercentFormat/Utils.hs \
   src/Text/PercentFormat/Quotient.hs
 src/Text/PercentFormat/Spec.o: \
   src/Text/PercentFormat/Spec.hs
 src/Text/PercentFormat/Utils.o: \
   src/Text/PercentFormat/Utils.hs
-tests/test-number.o: \
-  tests/Test.hs \
-  tests/test-number.hs \
+test/number.o: \
+  test/Test.hs \
+  test/number.hs \
   src/Text/PercentFormat/Utils.hs \
   src/Text/PercentFormat/Spec.hs \
   src/Text/PercentFormat/Quotient.hs \
   src/Text/PercentFormat.hs
-tests/test-number: \
-  tests/Test.hs \
-  tests/test-number.hs \
+test/number: \
+  test/Test.hs \
+  test/number.hs \
   mk/toplibs
-tests/Test.o: \
-  tests/Test.hs \
-  src/Text/PercentFormat/Utils.hs \
-  src/Text/PercentFormat/Spec.hs \
-  src/Text/PercentFormat/Quotient.hs \
-  src/Text/PercentFormat.hs
-tests/test-prop.o: \
-  tests/test-prop.hs \
-  tests/Test.hs \
+test/prop.o: \
+  test/Test.hs \
+  test/prop.hs \
   src/Text/PercentFormat/Utils.hs \
   src/Text/PercentFormat/Spec.hs \
   src/Text/PercentFormat/Quotient.hs \
   src/Text/PercentFormat.hs
-tests/test-prop: \
-  tests/test-prop.hs \
-  tests/Test.hs \
+test/prop: \
+  test/Test.hs \
+  test/prop.hs \
   mk/toplibs
-tests/test-quotient.o: \
-  tests/test-quotient.hs \
-  tests/Test.hs \
+test/quotient.o: \
+  test/Test.hs \
+  test/quotient.hs \
   src/Text/PercentFormat/Utils.hs \
-  src/Text/PercentFormat/Spec.hs \
-  src/Text/PercentFormat/Quotient.hs \
-  src/Text/PercentFormat.hs
-tests/test-quotient: \
-  tests/test-quotient.hs \
-  tests/Test.hs \
+  src/Text/PercentFormat/Quotient.hs
+test/quotient: \
+  test/Test.hs \
+  test/quotient.hs \
   mk/toplibs
-tests/test-spec.o: \
-  tests/test-spec.hs \
-  tests/Test.hs \
+test/scientific.o: \
+  test/Test.hs \
+  test/scientific.hs \
   src/Text/PercentFormat/Utils.hs \
   src/Text/PercentFormat/Spec.hs \
   src/Text/PercentFormat/Quotient.hs \
   src/Text/PercentFormat.hs
-tests/test-spec: \
-  tests/test-spec.hs \
-  tests/Test.hs \
+test/scientific: \
+  test/Test.hs \
+  test/scientific.hs \
   mk/toplibs
-tests/test-unit.o: \
-  tests/test-unit.hs \
-  tests/Test.hs \
+test/spec.o: \
+  test/Test.hs \
+  test/spec.hs \
+  src/Text/PercentFormat/Spec.hs
+test/spec: \
+  test/Test.hs \
+  test/spec.hs \
+  mk/toplibs
+test/Test.o: \
+  test/Test.hs
+test/unit.o: \
+  test/unit.hs \
+  test/Test.hs \
   src/Text/PercentFormat/Utils.hs \
   src/Text/PercentFormat/Spec.hs \
   src/Text/PercentFormat/Quotient.hs \
   src/Text/PercentFormat.hs
-tests/test-unit: \
-  tests/test-unit.hs \
-  tests/Test.hs \
+test/unit: \
+  test/unit.hs \
+  test/Test.hs \
   mk/toplibs
diff --git a/mk/ghcdeps b/mk/ghcdeps
--- a/mk/ghcdeps
+++ b/mk/ghcdeps
@@ -2,7 +2,7 @@
 #
 # ghcdeps: generate Haskell make dependencies for compiling with GHC.
 #
-# Copyright (c) 2015-2017 Rudy Matela.
+# Copyright (c) 2015-2021 Rudy Matela.
 # Distributed under the 3-Clause BSD licence.
 #
 # From a list of files provided on standard input,
@@ -46,4 +46,5 @@
 	rm -f tmp.mk
 done |
 sort |
+grep -v "^Loaded package environment from " |
 sed -e 's,  *, \\\n  ,g'
diff --git a/mk/haddock-i b/mk/haddock-i
--- a/mk/haddock-i
+++ b/mk/haddock-i
@@ -2,7 +2,7 @@
 #
 # haddock-i: list haddock's -i parameters.
 #
-# Copyright (c) 2015-2017 Rudy Matela.
+# Copyright (c) 2015-2021 Rudy Matela.
 # Distributed under the 3-Clause BSD licence.
 #
 # $ haddock-i <package1> <package2> ... <packageN>
@@ -11,14 +11,26 @@
 # documentation installed on your system, so you can:
 #
 # $ haddock-i base template-haskell | xargs haddock <files>
-errxit() {
+err() {
 	echo "$@" > /dev/stderr
+}
+
+errxit() {
+	err "$@"
 	exit 1
 }
 
-for pkg in "$@"; do
-	ghc-pkg field $pkg haddock-html,haddock-interfaces ||
-	errxit "error: haddock-i: cannot find package $pkg (ghc-pkg)"
-done |
-sed "s/.*: //" |
-sed "N;s/\n/,/;s/^/-i/"
+iface-for() {
+	ghc-pkg field $1 haddock-interfaces | sort -rV | head -1 | sed "s/.*: //"
+}
+
+html-for() {
+	ghc-pkg field $1 haddock-html       | sort -rV | head -1 | sed "s/.*: //"
+}
+
+for pkg in "$@"
+do
+	iface=$(iface-for $pkg)
+	html=$(html-for $pkg)
+	[ -d "$html" -a -f "$iface" ] && echo "-i$html,$iface" || err "haddock-i: warning: could not find interface file for $pkg"
+done
diff --git a/mk/haskell.mk b/mk/haskell.mk
--- a/mk/haskell.mk
+++ b/mk/haskell.mk
@@ -1,6 +1,6 @@
 # Implicit rules for compiling Haskell code.
 #
-# Copyright (c) 2015-2018 Rudy Matela.
+# Copyright (c) 2015-2021 Rudy Matela.
 # Distributed under the 3-Clause BSD licence.
 #
 # You can optionally configure the "Configuration variables" below in your main
@@ -20,6 +20,8 @@
 GHCFLAGS ?=
 GHC ?= ghc
 GHCCMD = $(GHC) -i$(GHCIMPORTDIRS) $(GHCFLAGS)
+HADDOCK ?= haddock
+CABAL_INSTALL = $(shell cabal --version | grep -q "version [0-2]\." && echo 'cabal install' || echo 'cabal v1-install')
 
 # Hugs Parameters
 HUGSIMPORTDIRS ?= "/usr/lib/hugs/packages/*"
@@ -38,14 +40,20 @@
 # ALL_HSS: all Haskell files
 # You can override ALL/LIB_HSS in your main Makefile
 LIST_LIB_HSS ?= find src -name "*.hs"
-LIST_ALL_HSS ?= find \( -path "./dist" -o -path "./.stack-work" \) -prune \
+LIST_ALL_HSS ?= find \( -path "./dist*" -o -path "./.stack-work" -o -path "./Setup.hs" \) -prune \
                      -o -name "*.*hs" -print
 LIB_HSS ?= $(shell $(LIST_LIB_HSS))
 ALL_HSS ?= $(shell $(LIST_ALL_HSS))
 
+LIB_DEPS ?= base
+ALL_DEPS ?= $(LIB_DEPS)
+INSTALL_DEPS ?=
+
 PKGNAME = $(shell cat *.cabal | grep "^name:"    | sed -e "s/name: *//")
 
+HADDOCK_HAS = haddock --help | grep -q --
 
+
 # Implicit rules
 %.hi %.o: %.hs
 	$(GHCCMD) $< && touch $@
@@ -67,7 +75,8 @@
 
 
 # Cleaning rule (add as a clean dependency)
-.PHONY: clean-hi-o
+clean-hs: clean-hi-o clean-haddock clean-cabal clean-stack
+
 clean-hi-o:
 	find $(ALL_HSS) | sed -e 's/hs$$/o/'      | xargs rm -f
 	find $(ALL_HSS) | sed -e 's/hs$$/hi/'     | xargs rm -f
@@ -80,11 +89,14 @@
 depend:
 	find $(ALL_HSS) | ./mk/ghcdeps -i$(GHCIMPORTDIRS) $(GHCFLAGS) > $(DEPMK)
 
+install-dependencies:
+	$(CABAL_INSTALL) $(INSTALL_DEPS)
+
 # haddock rules
 haddock: doc/index.html
 
 clean-haddock:
-	rm -f doc/*.{html,css,js,png,gif,json} README.html
+	rm -f doc/*.{html,css,js,png,gif,json} doc/src/* README.html
 
 upload-haddock:
 	@echo "use \`cabal upload -d' instead"
@@ -93,9 +105,20 @@
 	@echo "(on Arch Linux, use: cabal haddock --for-hackage --haddock-options=--optghc=-dynamic)"
 
 doc/index.html: $(LIB_HSS)
-	./mk/haddock-i base template-haskell | xargs \
-	haddock --html -odoc $(LIB_HSS) $(HADDOCKFLAGS) --title=$(PKGNAME)
+	./mk/haddock-i $(LIB_DEPS) | xargs \
+	$(HADDOCK) --html -odoc $(LIB_HSS) \
+	  --title=$(PKGNAME) \
+	  $(shell $(HADDOCK_HAS) --package-name          && echo "--package-name=$(PKGNAME)" ) \
+	  $(shell $(HADDOCK_HAS) --hyperlinked-source    && echo "--hyperlinked-source"      ) \
+	  $(shell $(HADDOCK_HAS) --no-print-missing-docs && echo --no-print-missing-docs     ) \
+	  $(HADDOCKFLAGS)
 
+clean-cabal:
+	rm -rf dist/ dist-newstyle/ cabal.project.local cabal.project.local~
+
+clean-stack:
+	rm -rf .stack-work/ stack.yaml.lock
+
 # lists all Haskell source files
 list-all-hss:
 	@find $(ALL_HSS)
@@ -103,6 +126,12 @@
 # lists library Haskell source files
 list-lib-hss:
 	@find $(LIB_HSS)
+
+bootstrap-haskell-mk:
+	@[ -d "$(DEST)" ] || (echo -e "error: no destination found\nusage: \`make bootstrap-haskell-mk DEST=path/to/prj'"; exit 1)
+	mkdir -p mk
+	cp mk/{haskell.mk,ghcdeps,haddock-i} $(DEST)/mk
+	touch $(DEST)/mk/depend.mk
 
 show-pkgname:
 	@echo $(PKGNAME)
diff --git a/mk/install-on b/mk/install-on
new file mode 100644
--- /dev/null
+++ b/mk/install-on
@@ -0,0 +1,33 @@
+#!/bin/bash
+#
+# mk/install-on: install or updates the mk folder on a Haskell project
+#
+# Copyright (c) 2019-2021 Rudy Matela.
+# Distributed under the 3-Clause BSD licence.
+#
+# usage: ./mk/install-on path/to/project
+#
+# This script assumes that:
+#
+# * tests are stored in a "test/" folder
+# * sources are stored in a "src/" folder
+set -e
+
+errxit() {
+	echo "$@" > /dev/stderr
+	exit 1
+}
+
+src=`dirname $0`/..
+dst="$1"
+
+[ -n "$dst" ] || errxit "destination folder not provided"
+
+mkdir -p $dst/mk
+mkdir -p $dst/test
+
+cp $src/mk/ghcdeps    $dst/mk/ghcdeps
+cp $src/mk/haddock-i  $dst/mk/haddock-i
+cp $src/mk/haskell.mk $dst/mk/haskell.mk
+cp $src/mk/install-on $dst/mk/install-on
+cp $src/test/sdist    $dst/test/sdist
diff --git a/percent-format.cabal b/percent-format.cabal
--- a/percent-format.cabal
+++ b/percent-format.cabal
@@ -1,7 +1,7 @@
 -- Cabal file for PercentFormat
 
 name:                percent-format
-version:             0.0.1
+version:             0.0.2
 synopsis:            simple printf-style string formatting
 description:
   The @Text.PercentFormat@ library provides printf-style string formatting.  It
@@ -27,13 +27,23 @@
                   , mk/All.hs
                   , mk/haskell.mk
                   , mk/Toplibs.hs
+                  , mk/install-on
                   , stack.yaml
-                  , tests/test-sdist
-                  , .travis.yml
+                  , test/sdist
+                  , .github/workflows/build.yml
                   , bench/examples.hs
                   , bench/speculate.hs
-                  , tests/diff/*.out
-tested-with: GHC==8.4, GHC==8.2, GHC==8.0, GHC==7.10, GHC==7.8
+                  , test/diff/*.out
+tested-with: GHC==9.0
+           , GHC==8.10
+           , GHC==8.8
+           , GHC==8.6
+           , GHC==8.4
+           , GHC==8.2
+           , GHC==8.0
+           , GHC==7.10
+           , GHC==7.8
+           , Hugs==2006.9
 
 
 source-repository head
@@ -43,7 +53,7 @@
 source-repository this
   type:            git
   location:        https://github.com/rudymatela/percent-format
-  tag:             v0.0.1
+  tag:             v0.0.2
 
 library
   exposed-modules: Text.PercentFormat
@@ -56,48 +66,48 @@
 
 test-suite number
   type:                exitcode-stdio-1.0
-  main-is:             test-number.hs
+  main-is:             number.hs
   other-modules:       Test
-  hs-source-dirs:      tests
-  build-depends:       base >= 4 && < 5, percent-format, leancheck
+  hs-source-dirs:      test
+  build-depends:       base >= 4 && < 5, percent-format, leancheck >= 0.9.2
   default-language:    Haskell2010
 
 test-suite scientific
   type:                exitcode-stdio-1.0
-  main-is:             test-scientific.hs
+  main-is:             scientific.hs
   other-modules:       Test
-  hs-source-dirs:      tests
-  build-depends:       base >= 4 && < 5, percent-format, leancheck
+  hs-source-dirs:      test
+  build-depends:       base >= 4 && < 5, percent-format, leancheck >= 0.9.2
   default-language:    Haskell2010
 
 test-suite prop
   type:                exitcode-stdio-1.0
-  main-is:             test-prop.hs
+  main-is:             prop.hs
   other-modules:       Test
-  hs-source-dirs:      tests
-  build-depends:       base >= 4 && < 5, percent-format, leancheck
+  hs-source-dirs:      test
+  build-depends:       base >= 4 && < 5, percent-format, leancheck >= 0.9.2
   default-language:    Haskell2010
 
 test-suite quotient
   type:                exitcode-stdio-1.0
-  main-is:             test-quotient.hs
+  main-is:             quotient.hs
   other-modules:       Test
-  hs-source-dirs:      tests
-  build-depends:       base >= 4 && < 5, percent-format, leancheck
+  hs-source-dirs:      test
+  build-depends:       base >= 4 && < 5, percent-format, leancheck >= 0.9.2
   default-language:    Haskell2010
 
 test-suite unit
   type:                exitcode-stdio-1.0
-  main-is:             test-unit.hs
+  main-is:             unit.hs
   other-modules:       Test
-  hs-source-dirs:      tests
-  build-depends:       base >= 4 && < 5, percent-format, leancheck
+  hs-source-dirs:      test
+  build-depends:       base >= 4 && < 5, percent-format, leancheck >= 0.9.2
   default-language:    Haskell2010
 
 test-suite spec
   type:                exitcode-stdio-1.0
-  main-is:             test-spec.hs
+  main-is:             spec.hs
   other-modules:       Test
-  hs-source-dirs:      tests
-  build-depends:       base >= 4 && < 5, percent-format, leancheck
+  hs-source-dirs:      test
+  build-depends:       base >= 4 && < 5, percent-format, leancheck >= 0.9.2
   default-language:    Haskell2010
diff --git a/stack.yaml b/stack.yaml
--- a/stack.yaml
+++ b/stack.yaml
@@ -1,10 +1,11 @@
 # stack file for PercentFormat
-resolver: lts-11.11
+resolver: lts-17.9 # or ghc-8.10.4
 
 packages:
 - .
 
-extra-deps: []
+extra-deps:
+- leancheck-0.9.4
 
 flags: {}
 
diff --git a/test/Test.hs b/test/Test.hs
new file mode 100644
--- /dev/null
+++ b/test/Test.hs
@@ -0,0 +1,21 @@
+-- |
+-- Module      : Test
+-- Copyright   : (c) 2018 Rudy Matela
+-- License     : 3-Clause BSD  (see the file LICENSE)
+-- Maintainer  : Rudy Matela <rudy@matela.com.br>
+--
+-- This module is part of PercentFormat.
+--
+-- Some helper functios to test PercentFormat itself.
+module Test where
+
+import System.Environment (getArgs)
+import System.Exit (exitFailure)
+import Data.List (elemIndices)
+
+reportTests :: [Bool] -> IO ()
+reportTests tests =
+  case elemIndices False tests of
+    [] -> putStrLn "+++ Tests passed!"
+    is -> do putStrLn ("*** Failed tests:" ++ show is)
+             exitFailure
diff --git a/test/diff/examples-+3i.out b/test/diff/examples-+3i.out
new file mode 100644
--- /dev/null
+++ b/test/diff/examples-+3i.out
@@ -0,0 +1,63 @@
+"%+3i" -% ""           == "!!!"
+"%+3i" -% "a"          == "!!!"
+"%+3i" -% "aa"         == "!!!"
+"%+3i" -% " "          == "!!!"
+"%+3i" -% "aaa"        == "!!!"
+"%+3i" -% "a "         == "!!!"
+"%+3i" -% " a"         == "!!!"
+"%+3i" -% "b"          == "!!!"
+"%+3i" -% "aaaa"       == "!!!"
+"%+3i" -% "aa "        == "!!!"
+"%+3i" -% "a a"        == "!!!"
+"%+3i" -% "ab"         == "!!!"
+"%+3i" -% 0            == " +0"
+"%+3i" -% 1            == " +1"
+"%+3i" -% (-1)         == " -1"
+"%+3i" -% 2            == " +2"
+"%+3i" -% (-2)         == " -2"
+"%+3i" -% 3            == " +3"
+"%+3i" -% (-3)         == " -3"
+"%+3i" -% 4            == " +4"
+"%+3i" -% (-4)         == " -4"
+"%+3i" -% 5            == " +5"
+"%+3i" -% (-5)         == " -5"
+"%+3i" -% 6            == " +6"
+"%+3i" -% 0.0          == " +0"
+"%+3i" -% 1.0          == " +1"
+"%+3i" -% (-1.0)       == " -1"
+"%+3i" -% Infinity     == "+Infinity"
+"%+3i" -% 0.5          == " +0"
+"%+3i" -% 2.0          == " +2"
+"%+3i" -% (-Infinity)  == "-Infinity"
+"%+3i" -% (-0.5)       == " -0"
+"%+3i" -% (-2.0)       == " -2"
+"%+3i" -% 0.33333334   == " +0"
+"%+3i" -% 3.0          == " +3"
+"%+3i" -% (-0.33333334) == " -0"
+"%+3i" -% (0 % 1)      == " +0"
+"%+3i" -% (1 % 1)      == " +1"
+"%+3i" -% ((-1) % 1)   == " -1"
+"%+3i" -% (1 % 2)      == " +0"
+"%+3i" -% (2 % 1)      == " +2"
+"%+3i" -% ((-1) % 2)   == " -0"
+"%+3i" -% ((-2) % 1)   == " -2"
+"%+3i" -% (1 % 3)      == " +0"
+"%+3i" -% (3 % 1)      == " +3"
+"%+3i" -% ((-1) % 3)   == " -0"
+"%+3i" -% ((-3) % 1)   == " -3"
+"%+3i" -% (1 % 4)      == " +0"
+"%+3i" -% 'a'          == "!!!"
+"%+3i" -% ' '          == "!!!"
+"%+3i" -% 'b'          == "!!!"
+"%+3i" -% 'A'          == "!!!"
+"%+3i" -% 'c'          == "!!!"
+"%+3i" -% '\n'         == "!!!"
+"%+3i" -% 'd'          == "!!!"
+"%+3i" -% '0'          == "!!!"
+"%+3i" -% 'e'          == "!!!"
+"%+3i" -% 'B'          == "!!!"
+"%+3i" -% 'f'          == "!!!"
+"%+3i" -% '!'          == "!!!"
+"%+3i" -% False        == "!!!"
+"%+3i" -% True         == "!!!"
+
diff --git a/test/diff/examples-+5f.out b/test/diff/examples-+5f.out
new file mode 100644
--- /dev/null
+++ b/test/diff/examples-+5f.out
@@ -0,0 +1,63 @@
+"%+5f" -% ""           == "!!!!!"
+"%+5f" -% "a"          == "!!!!!"
+"%+5f" -% "aa"         == "!!!!!"
+"%+5f" -% " "          == "!!!!!"
+"%+5f" -% "aaa"        == "!!!!!"
+"%+5f" -% "a "         == "!!!!!"
+"%+5f" -% " a"         == "!!!!!"
+"%+5f" -% "b"          == "!!!!!"
+"%+5f" -% "aaaa"       == "!!!!!"
+"%+5f" -% "aa "        == "!!!!!"
+"%+5f" -% "a a"        == "!!!!!"
+"%+5f" -% "ab"         == "!!!!!"
+"%+5f" -% 0            == " +0.0"
+"%+5f" -% 1            == " +1.0"
+"%+5f" -% (-1)         == " -1.0"
+"%+5f" -% 2            == " +2.0"
+"%+5f" -% (-2)         == " -2.0"
+"%+5f" -% 3            == " +3.0"
+"%+5f" -% (-3)         == " -3.0"
+"%+5f" -% 4            == " +4.0"
+"%+5f" -% (-4)         == " -4.0"
+"%+5f" -% 5            == " +5.0"
+"%+5f" -% (-5)         == " -5.0"
+"%+5f" -% 6            == " +6.0"
+"%+5f" -% 0.0          == " +0.0"
+"%+5f" -% 1.0          == " +1.0"
+"%+5f" -% (-1.0)       == " -1.0"
+"%+5f" -% Infinity     == "+Infinity"
+"%+5f" -% 0.5          == " +0.5"
+"%+5f" -% 2.0          == " +2.0"
+"%+5f" -% (-Infinity)  == "-Infinity"
+"%+5f" -% (-0.5)       == " -0.5"
+"%+5f" -% (-2.0)       == " -2.0"
+"%+5f" -% 0.33333334   == "+0.33333334"
+"%+5f" -% 3.0          == " +3.0"
+"%+5f" -% (-0.33333334) == "-0.33333334"
+"%+5f" -% (0 % 1)      == " +0.0"
+"%+5f" -% (1 % 1)      == " +1.0"
+"%+5f" -% ((-1) % 1)   == " -1.0"
+"%+5f" -% (1 % 2)      == " +0.5"
+"%+5f" -% (2 % 1)      == " +2.0"
+"%+5f" -% ((-1) % 2)   == " -0.5"
+"%+5f" -% ((-2) % 1)   == " -2.0"
+"%+5f" -% (1 % 3)      == "   +0"
+"%+5f" -% (3 % 1)      == " +3.0"
+"%+5f" -% ((-1) % 3)   == "   -0"
+"%+5f" -% ((-3) % 1)   == " -3.0"
+"%+5f" -% (1 % 4)      == "+0.25"
+"%+5f" -% 'a'          == "!!!!!"
+"%+5f" -% ' '          == "!!!!!"
+"%+5f" -% 'b'          == "!!!!!"
+"%+5f" -% 'A'          == "!!!!!"
+"%+5f" -% 'c'          == "!!!!!"
+"%+5f" -% '\n'         == "!!!!!"
+"%+5f" -% 'd'          == "!!!!!"
+"%+5f" -% '0'          == "!!!!!"
+"%+5f" -% 'e'          == "!!!!!"
+"%+5f" -% 'B'          == "!!!!!"
+"%+5f" -% 'f'          == "!!!!!"
+"%+5f" -% '!'          == "!!!!!"
+"%+5f" -% False        == "!!!!!"
+"%+5f" -% True         == "!!!!!"
+
diff --git a/test/diff/examples--11p2f.out b/test/diff/examples--11p2f.out
new file mode 100644
--- /dev/null
+++ b/test/diff/examples--11p2f.out
@@ -0,0 +1,63 @@
+"%-11.2f" -% ""           == "!!!!!!!!!!!"
+"%-11.2f" -% "a"          == "!!!!!!!!!!!"
+"%-11.2f" -% "aa"         == "!!!!!!!!!!!"
+"%-11.2f" -% " "          == "!!!!!!!!!!!"
+"%-11.2f" -% "aaa"        == "!!!!!!!!!!!"
+"%-11.2f" -% "a "         == "!!!!!!!!!!!"
+"%-11.2f" -% " a"         == "!!!!!!!!!!!"
+"%-11.2f" -% "b"          == "!!!!!!!!!!!"
+"%-11.2f" -% "aaaa"       == "!!!!!!!!!!!"
+"%-11.2f" -% "aa "        == "!!!!!!!!!!!"
+"%-11.2f" -% "a a"        == "!!!!!!!!!!!"
+"%-11.2f" -% "ab"         == "!!!!!!!!!!!"
+"%-11.2f" -% 0            == "0.00       "
+"%-11.2f" -% 1            == "1.00       "
+"%-11.2f" -% (-1)         == "-1.00      "
+"%-11.2f" -% 2            == "2.00       "
+"%-11.2f" -% (-2)         == "-2.00      "
+"%-11.2f" -% 3            == "3.00       "
+"%-11.2f" -% (-3)         == "-3.00      "
+"%-11.2f" -% 4            == "4.00       "
+"%-11.2f" -% (-4)         == "-4.00      "
+"%-11.2f" -% 5            == "5.00       "
+"%-11.2f" -% (-5)         == "-5.00      "
+"%-11.2f" -% 6            == "6.00       "
+"%-11.2f" -% 0.0          == "0.00       "
+"%-11.2f" -% 1.0          == "1.00       "
+"%-11.2f" -% (-1.0)       == "-1.00      "
+"%-11.2f" -% Infinity     == "Infinity   "
+"%-11.2f" -% 0.5          == "0.50       "
+"%-11.2f" -% 2.0          == "2.00       "
+"%-11.2f" -% (-Infinity)  == "-Infinity  "
+"%-11.2f" -% (-0.5)       == "-0.50      "
+"%-11.2f" -% (-2.0)       == "-2.00      "
+"%-11.2f" -% 0.33333334   == "0.33       "
+"%-11.2f" -% 3.0          == "3.00       "
+"%-11.2f" -% (-0.33333334) == "-0.33      "
+"%-11.2f" -% (0 % 1)      == "0.00       "
+"%-11.2f" -% (1 % 1)      == "1.00       "
+"%-11.2f" -% ((-1) % 1)   == "-1.00      "
+"%-11.2f" -% (1 % 2)      == "0.50       "
+"%-11.2f" -% (2 % 1)      == "2.00       "
+"%-11.2f" -% ((-1) % 2)   == "-0.50      "
+"%-11.2f" -% ((-2) % 1)   == "-2.00      "
+"%-11.2f" -% (1 % 3)      == "0.33       "
+"%-11.2f" -% (3 % 1)      == "3.00       "
+"%-11.2f" -% ((-1) % 3)   == "-0.33      "
+"%-11.2f" -% ((-3) % 1)   == "-3.00      "
+"%-11.2f" -% (1 % 4)      == "0.25       "
+"%-11.2f" -% 'a'          == "!!!!!!!!!!!"
+"%-11.2f" -% ' '          == "!!!!!!!!!!!"
+"%-11.2f" -% 'b'          == "!!!!!!!!!!!"
+"%-11.2f" -% 'A'          == "!!!!!!!!!!!"
+"%-11.2f" -% 'c'          == "!!!!!!!!!!!"
+"%-11.2f" -% '\n'         == "!!!!!!!!!!!"
+"%-11.2f" -% 'd'          == "!!!!!!!!!!!"
+"%-11.2f" -% '0'          == "!!!!!!!!!!!"
+"%-11.2f" -% 'e'          == "!!!!!!!!!!!"
+"%-11.2f" -% 'B'          == "!!!!!!!!!!!"
+"%-11.2f" -% 'f'          == "!!!!!!!!!!!"
+"%-11.2f" -% '!'          == "!!!!!!!!!!!"
+"%-11.2f" -% False        == "!!!!!!!!!!!"
+"%-11.2f" -% True         == "!!!!!!!!!!!"
+
diff --git a/test/diff/examples--3i.out b/test/diff/examples--3i.out
new file mode 100644
--- /dev/null
+++ b/test/diff/examples--3i.out
@@ -0,0 +1,63 @@
+"%-3i" -% ""           == "!!!"
+"%-3i" -% "a"          == "!!!"
+"%-3i" -% "aa"         == "!!!"
+"%-3i" -% " "          == "!!!"
+"%-3i" -% "aaa"        == "!!!"
+"%-3i" -% "a "         == "!!!"
+"%-3i" -% " a"         == "!!!"
+"%-3i" -% "b"          == "!!!"
+"%-3i" -% "aaaa"       == "!!!"
+"%-3i" -% "aa "        == "!!!"
+"%-3i" -% "a a"        == "!!!"
+"%-3i" -% "ab"         == "!!!"
+"%-3i" -% 0            == "0  "
+"%-3i" -% 1            == "1  "
+"%-3i" -% (-1)         == "-1 "
+"%-3i" -% 2            == "2  "
+"%-3i" -% (-2)         == "-2 "
+"%-3i" -% 3            == "3  "
+"%-3i" -% (-3)         == "-3 "
+"%-3i" -% 4            == "4  "
+"%-3i" -% (-4)         == "-4 "
+"%-3i" -% 5            == "5  "
+"%-3i" -% (-5)         == "-5 "
+"%-3i" -% 6            == "6  "
+"%-3i" -% 0.0          == "0  "
+"%-3i" -% 1.0          == "1  "
+"%-3i" -% (-1.0)       == "-1 "
+"%-3i" -% Infinity     == "Infinity"
+"%-3i" -% 0.5          == "0  "
+"%-3i" -% 2.0          == "2  "
+"%-3i" -% (-Infinity)  == "-Infinity"
+"%-3i" -% (-0.5)       == "-0 "
+"%-3i" -% (-2.0)       == "-2 "
+"%-3i" -% 0.33333334   == "0  "
+"%-3i" -% 3.0          == "3  "
+"%-3i" -% (-0.33333334) == "-0 "
+"%-3i" -% (0 % 1)      == "0  "
+"%-3i" -% (1 % 1)      == "1  "
+"%-3i" -% ((-1) % 1)   == "-1 "
+"%-3i" -% (1 % 2)      == "0  "
+"%-3i" -% (2 % 1)      == "2  "
+"%-3i" -% ((-1) % 2)   == "-0 "
+"%-3i" -% ((-2) % 1)   == "-2 "
+"%-3i" -% (1 % 3)      == "0  "
+"%-3i" -% (3 % 1)      == "3  "
+"%-3i" -% ((-1) % 3)   == "-0 "
+"%-3i" -% ((-3) % 1)   == "-3 "
+"%-3i" -% (1 % 4)      == "0  "
+"%-3i" -% 'a'          == "!!!"
+"%-3i" -% ' '          == "!!!"
+"%-3i" -% 'b'          == "!!!"
+"%-3i" -% 'A'          == "!!!"
+"%-3i" -% 'c'          == "!!!"
+"%-3i" -% '\n'         == "!!!"
+"%-3i" -% 'd'          == "!!!"
+"%-3i" -% '0'          == "!!!"
+"%-3i" -% 'e'          == "!!!"
+"%-3i" -% 'B'          == "!!!"
+"%-3i" -% 'f'          == "!!!"
+"%-3i" -% '!'          == "!!!"
+"%-3i" -% False        == "!!!"
+"%-3i" -% True         == "!!!"
+
diff --git a/test/diff/examples--5f.out b/test/diff/examples--5f.out
new file mode 100644
--- /dev/null
+++ b/test/diff/examples--5f.out
@@ -0,0 +1,63 @@
+"%-5f" -% ""           == "!!!!!"
+"%-5f" -% "a"          == "!!!!!"
+"%-5f" -% "aa"         == "!!!!!"
+"%-5f" -% " "          == "!!!!!"
+"%-5f" -% "aaa"        == "!!!!!"
+"%-5f" -% "a "         == "!!!!!"
+"%-5f" -% " a"         == "!!!!!"
+"%-5f" -% "b"          == "!!!!!"
+"%-5f" -% "aaaa"       == "!!!!!"
+"%-5f" -% "aa "        == "!!!!!"
+"%-5f" -% "a a"        == "!!!!!"
+"%-5f" -% "ab"         == "!!!!!"
+"%-5f" -% 0            == "0.0  "
+"%-5f" -% 1            == "1.0  "
+"%-5f" -% (-1)         == "-1.0 "
+"%-5f" -% 2            == "2.0  "
+"%-5f" -% (-2)         == "-2.0 "
+"%-5f" -% 3            == "3.0  "
+"%-5f" -% (-3)         == "-3.0 "
+"%-5f" -% 4            == "4.0  "
+"%-5f" -% (-4)         == "-4.0 "
+"%-5f" -% 5            == "5.0  "
+"%-5f" -% (-5)         == "-5.0 "
+"%-5f" -% 6            == "6.0  "
+"%-5f" -% 0.0          == "0.0  "
+"%-5f" -% 1.0          == "1.0  "
+"%-5f" -% (-1.0)       == "-1.0 "
+"%-5f" -% Infinity     == "Infinity"
+"%-5f" -% 0.5          == "0.5  "
+"%-5f" -% 2.0          == "2.0  "
+"%-5f" -% (-Infinity)  == "-Infinity"
+"%-5f" -% (-0.5)       == "-0.5 "
+"%-5f" -% (-2.0)       == "-2.0 "
+"%-5f" -% 0.33333334   == "0.33333334"
+"%-5f" -% 3.0          == "3.0  "
+"%-5f" -% (-0.33333334) == "-0.33333334"
+"%-5f" -% (0 % 1)      == "0.0  "
+"%-5f" -% (1 % 1)      == "1.0  "
+"%-5f" -% ((-1) % 1)   == "-1.0 "
+"%-5f" -% (1 % 2)      == "0.5  "
+"%-5f" -% (2 % 1)      == "2.0  "
+"%-5f" -% ((-1) % 2)   == "-0.5 "
+"%-5f" -% ((-2) % 1)   == "-2.0 "
+"%-5f" -% (1 % 3)      == "0    "
+"%-5f" -% (3 % 1)      == "3.0  "
+"%-5f" -% ((-1) % 3)   == "-0   "
+"%-5f" -% ((-3) % 1)   == "-3.0 "
+"%-5f" -% (1 % 4)      == "0.25 "
+"%-5f" -% 'a'          == "!!!!!"
+"%-5f" -% ' '          == "!!!!!"
+"%-5f" -% 'b'          == "!!!!!"
+"%-5f" -% 'A'          == "!!!!!"
+"%-5f" -% 'c'          == "!!!!!"
+"%-5f" -% '\n'         == "!!!!!"
+"%-5f" -% 'd'          == "!!!!!"
+"%-5f" -% '0'          == "!!!!!"
+"%-5f" -% 'e'          == "!!!!!"
+"%-5f" -% 'B'          == "!!!!!"
+"%-5f" -% 'f'          == "!!!!!"
+"%-5f" -% '!'          == "!!!!!"
+"%-5f" -% False        == "!!!!!"
+"%-5f" -% True         == "!!!!!"
+
diff --git a/test/diff/examples--6r.out b/test/diff/examples--6r.out
new file mode 100644
--- /dev/null
+++ b/test/diff/examples--6r.out
@@ -0,0 +1,63 @@
+"%-6r" -% ""           == "\"\"    "
+"%-6r" -% "a"          == "\"a\"   "
+"%-6r" -% "aa"         == "\"aa\"  "
+"%-6r" -% " "          == "\" \"   "
+"%-6r" -% "aaa"        == "\"aaa\" "
+"%-6r" -% "a "         == "\"a \"  "
+"%-6r" -% " a"         == "\" a\"  "
+"%-6r" -% "b"          == "\"b\"   "
+"%-6r" -% "aaaa"       == "\"aaaa\""
+"%-6r" -% "aa "        == "\"aa \" "
+"%-6r" -% "a a"        == "\"a a\" "
+"%-6r" -% "ab"         == "\"ab\"  "
+"%-6r" -% 0            == "0     "
+"%-6r" -% 1            == "1     "
+"%-6r" -% (-1)         == "-1    "
+"%-6r" -% 2            == "2     "
+"%-6r" -% (-2)         == "-2    "
+"%-6r" -% 3            == "3     "
+"%-6r" -% (-3)         == "-3    "
+"%-6r" -% 4            == "4     "
+"%-6r" -% (-4)         == "-4    "
+"%-6r" -% 5            == "5     "
+"%-6r" -% (-5)         == "-5    "
+"%-6r" -% 6            == "6     "
+"%-6r" -% 0.0          == "0.0   "
+"%-6r" -% 1.0          == "1.0   "
+"%-6r" -% (-1.0)       == "-1.0  "
+"%-6r" -% Infinity     == "Infinity"
+"%-6r" -% 0.5          == "0.5   "
+"%-6r" -% 2.0          == "2.0   "
+"%-6r" -% (-Infinity)  == "-Infinity"
+"%-6r" -% (-0.5)       == "-0.5  "
+"%-6r" -% (-2.0)       == "-2.0  "
+"%-6r" -% 0.33333334   == "0.33333334"
+"%-6r" -% 3.0          == "3.0   "
+"%-6r" -% (-0.33333334) == "-0.33333334"
+"%-6r" -% (0 % 1)      == "0 % 1 "
+"%-6r" -% (1 % 1)      == "1 % 1 "
+"%-6r" -% ((-1) % 1)   == "(-1) % 1"
+"%-6r" -% (1 % 2)      == "1 % 2 "
+"%-6r" -% (2 % 1)      == "2 % 1 "
+"%-6r" -% ((-1) % 2)   == "(-1) % 2"
+"%-6r" -% ((-2) % 1)   == "(-2) % 1"
+"%-6r" -% (1 % 3)      == "1 % 3 "
+"%-6r" -% (3 % 1)      == "3 % 1 "
+"%-6r" -% ((-1) % 3)   == "(-1) % 3"
+"%-6r" -% ((-3) % 1)   == "(-3) % 1"
+"%-6r" -% (1 % 4)      == "1 % 4 "
+"%-6r" -% 'a'          == "'a'   "
+"%-6r" -% ' '          == "' '   "
+"%-6r" -% 'b'          == "'b'   "
+"%-6r" -% 'A'          == "'A'   "
+"%-6r" -% 'c'          == "'c'   "
+"%-6r" -% '\n'         == "'\\n'  "
+"%-6r" -% 'd'          == "'d'   "
+"%-6r" -% '0'          == "'0'   "
+"%-6r" -% 'e'          == "'e'   "
+"%-6r" -% 'B'          == "'B'   "
+"%-6r" -% 'f'          == "'f'   "
+"%-6r" -% '!'          == "'!'   "
+"%-6r" -% False        == "False "
+"%-6r" -% True         == "True  "
+
diff --git a/test/diff/examples--6s.out b/test/diff/examples--6s.out
new file mode 100644
--- /dev/null
+++ b/test/diff/examples--6s.out
@@ -0,0 +1,63 @@
+"%-6s" -% ""           == "      "
+"%-6s" -% "a"          == "a     "
+"%-6s" -% "aa"         == "aa    "
+"%-6s" -% " "          == "      "
+"%-6s" -% "aaa"        == "aaa   "
+"%-6s" -% "a "         == "a     "
+"%-6s" -% " a"         == " a    "
+"%-6s" -% "b"          == "b     "
+"%-6s" -% "aaaa"       == "aaaa  "
+"%-6s" -% "aa "        == "aa    "
+"%-6s" -% "a a"        == "a a   "
+"%-6s" -% "ab"         == "ab    "
+"%-6s" -% 0            == "0     "
+"%-6s" -% 1            == "1     "
+"%-6s" -% (-1)         == "-1    "
+"%-6s" -% 2            == "2     "
+"%-6s" -% (-2)         == "-2    "
+"%-6s" -% 3            == "3     "
+"%-6s" -% (-3)         == "-3    "
+"%-6s" -% 4            == "4     "
+"%-6s" -% (-4)         == "-4    "
+"%-6s" -% 5            == "5     "
+"%-6s" -% (-5)         == "-5    "
+"%-6s" -% 6            == "6     "
+"%-6s" -% 0.0          == "0.0   "
+"%-6s" -% 1.0          == "1.0   "
+"%-6s" -% (-1.0)       == "-1.0  "
+"%-6s" -% Infinity     == "Infinity"
+"%-6s" -% 0.5          == "0.5   "
+"%-6s" -% 2.0          == "2.0   "
+"%-6s" -% (-Infinity)  == "-Infinity"
+"%-6s" -% (-0.5)       == "-0.5  "
+"%-6s" -% (-2.0)       == "-2.0  "
+"%-6s" -% 0.33333334   == "0.33333334"
+"%-6s" -% 3.0          == "3.0   "
+"%-6s" -% (-0.33333334) == "-0.33333334"
+"%-6s" -% (0 % 1)      == "0 % 1 "
+"%-6s" -% (1 % 1)      == "1 % 1 "
+"%-6s" -% ((-1) % 1)   == "(-1) % 1"
+"%-6s" -% (1 % 2)      == "1 % 2 "
+"%-6s" -% (2 % 1)      == "2 % 1 "
+"%-6s" -% ((-1) % 2)   == "(-1) % 2"
+"%-6s" -% ((-2) % 1)   == "(-2) % 1"
+"%-6s" -% (1 % 3)      == "1 % 3 "
+"%-6s" -% (3 % 1)      == "3 % 1 "
+"%-6s" -% ((-1) % 3)   == "(-1) % 3"
+"%-6s" -% ((-3) % 1)   == "(-3) % 1"
+"%-6s" -% (1 % 4)      == "1 % 4 "
+"%-6s" -% 'a'          == "'a'   "
+"%-6s" -% ' '          == "' '   "
+"%-6s" -% 'b'          == "'b'   "
+"%-6s" -% 'A'          == "'A'   "
+"%-6s" -% 'c'          == "'c'   "
+"%-6s" -% '\n'         == "'\\n'  "
+"%-6s" -% 'd'          == "'d'   "
+"%-6s" -% '0'          == "'0'   "
+"%-6s" -% 'e'          == "'e'   "
+"%-6s" -% 'B'          == "'B'   "
+"%-6s" -% 'f'          == "'f'   "
+"%-6s" -% '!'          == "'!'   "
+"%-6s" -% False        == "False "
+"%-6s" -% True         == "True  "
+
diff --git a/test/diff/examples-03i.out b/test/diff/examples-03i.out
new file mode 100644
--- /dev/null
+++ b/test/diff/examples-03i.out
@@ -0,0 +1,63 @@
+"%03i" -% ""           == "!!!"
+"%03i" -% "a"          == "!!!"
+"%03i" -% "aa"         == "!!!"
+"%03i" -% " "          == "!!!"
+"%03i" -% "aaa"        == "!!!"
+"%03i" -% "a "         == "!!!"
+"%03i" -% " a"         == "!!!"
+"%03i" -% "b"          == "!!!"
+"%03i" -% "aaaa"       == "!!!"
+"%03i" -% "aa "        == "!!!"
+"%03i" -% "a a"        == "!!!"
+"%03i" -% "ab"         == "!!!"
+"%03i" -% 0            == "000"
+"%03i" -% 1            == "001"
+"%03i" -% (-1)         == "-01"
+"%03i" -% 2            == "002"
+"%03i" -% (-2)         == "-02"
+"%03i" -% 3            == "003"
+"%03i" -% (-3)         == "-03"
+"%03i" -% 4            == "004"
+"%03i" -% (-4)         == "-04"
+"%03i" -% 5            == "005"
+"%03i" -% (-5)         == "-05"
+"%03i" -% 6            == "006"
+"%03i" -% 0.0          == "000"
+"%03i" -% 1.0          == "001"
+"%03i" -% (-1.0)       == "-01"
+"%03i" -% Infinity     == "Infinity"
+"%03i" -% 0.5          == "000"
+"%03i" -% 2.0          == "002"
+"%03i" -% (-Infinity)  == "-Infinity"
+"%03i" -% (-0.5)       == "-00"
+"%03i" -% (-2.0)       == "-02"
+"%03i" -% 0.33333334   == "000"
+"%03i" -% 3.0          == "003"
+"%03i" -% (-0.33333334) == "-00"
+"%03i" -% (0 % 1)      == "000"
+"%03i" -% (1 % 1)      == "001"
+"%03i" -% ((-1) % 1)   == "-01"
+"%03i" -% (1 % 2)      == "000"
+"%03i" -% (2 % 1)      == "002"
+"%03i" -% ((-1) % 2)   == "-00"
+"%03i" -% ((-2) % 1)   == "-02"
+"%03i" -% (1 % 3)      == "000"
+"%03i" -% (3 % 1)      == "003"
+"%03i" -% ((-1) % 3)   == "-00"
+"%03i" -% ((-3) % 1)   == "-03"
+"%03i" -% (1 % 4)      == "000"
+"%03i" -% 'a'          == "!!!"
+"%03i" -% ' '          == "!!!"
+"%03i" -% 'b'          == "!!!"
+"%03i" -% 'A'          == "!!!"
+"%03i" -% 'c'          == "!!!"
+"%03i" -% '\n'         == "!!!"
+"%03i" -% 'd'          == "!!!"
+"%03i" -% '0'          == "!!!"
+"%03i" -% 'e'          == "!!!"
+"%03i" -% 'B'          == "!!!"
+"%03i" -% 'f'          == "!!!"
+"%03i" -% '!'          == "!!!"
+"%03i" -% False        == "!!!"
+"%03i" -% True         == "!!!"
+
diff --git a/test/diff/examples-11p2f.out b/test/diff/examples-11p2f.out
new file mode 100644
--- /dev/null
+++ b/test/diff/examples-11p2f.out
@@ -0,0 +1,63 @@
+"%11.2f" -% ""           == "!!!!!!!!!!!"
+"%11.2f" -% "a"          == "!!!!!!!!!!!"
+"%11.2f" -% "aa"         == "!!!!!!!!!!!"
+"%11.2f" -% " "          == "!!!!!!!!!!!"
+"%11.2f" -% "aaa"        == "!!!!!!!!!!!"
+"%11.2f" -% "a "         == "!!!!!!!!!!!"
+"%11.2f" -% " a"         == "!!!!!!!!!!!"
+"%11.2f" -% "b"          == "!!!!!!!!!!!"
+"%11.2f" -% "aaaa"       == "!!!!!!!!!!!"
+"%11.2f" -% "aa "        == "!!!!!!!!!!!"
+"%11.2f" -% "a a"        == "!!!!!!!!!!!"
+"%11.2f" -% "ab"         == "!!!!!!!!!!!"
+"%11.2f" -% 0            == "       0.00"
+"%11.2f" -% 1            == "       1.00"
+"%11.2f" -% (-1)         == "      -1.00"
+"%11.2f" -% 2            == "       2.00"
+"%11.2f" -% (-2)         == "      -2.00"
+"%11.2f" -% 3            == "       3.00"
+"%11.2f" -% (-3)         == "      -3.00"
+"%11.2f" -% 4            == "       4.00"
+"%11.2f" -% (-4)         == "      -4.00"
+"%11.2f" -% 5            == "       5.00"
+"%11.2f" -% (-5)         == "      -5.00"
+"%11.2f" -% 6            == "       6.00"
+"%11.2f" -% 0.0          == "       0.00"
+"%11.2f" -% 1.0          == "       1.00"
+"%11.2f" -% (-1.0)       == "      -1.00"
+"%11.2f" -% Infinity     == "   Infinity"
+"%11.2f" -% 0.5          == "       0.50"
+"%11.2f" -% 2.0          == "       2.00"
+"%11.2f" -% (-Infinity)  == "  -Infinity"
+"%11.2f" -% (-0.5)       == "      -0.50"
+"%11.2f" -% (-2.0)       == "      -2.00"
+"%11.2f" -% 0.33333334   == "       0.33"
+"%11.2f" -% 3.0          == "       3.00"
+"%11.2f" -% (-0.33333334) == "      -0.33"
+"%11.2f" -% (0 % 1)      == "       0.00"
+"%11.2f" -% (1 % 1)      == "       1.00"
+"%11.2f" -% ((-1) % 1)   == "      -1.00"
+"%11.2f" -% (1 % 2)      == "       0.50"
+"%11.2f" -% (2 % 1)      == "       2.00"
+"%11.2f" -% ((-1) % 2)   == "      -0.50"
+"%11.2f" -% ((-2) % 1)   == "      -2.00"
+"%11.2f" -% (1 % 3)      == "       0.33"
+"%11.2f" -% (3 % 1)      == "       3.00"
+"%11.2f" -% ((-1) % 3)   == "      -0.33"
+"%11.2f" -% ((-3) % 1)   == "      -3.00"
+"%11.2f" -% (1 % 4)      == "       0.25"
+"%11.2f" -% 'a'          == "!!!!!!!!!!!"
+"%11.2f" -% ' '          == "!!!!!!!!!!!"
+"%11.2f" -% 'b'          == "!!!!!!!!!!!"
+"%11.2f" -% 'A'          == "!!!!!!!!!!!"
+"%11.2f" -% 'c'          == "!!!!!!!!!!!"
+"%11.2f" -% '\n'         == "!!!!!!!!!!!"
+"%11.2f" -% 'd'          == "!!!!!!!!!!!"
+"%11.2f" -% '0'          == "!!!!!!!!!!!"
+"%11.2f" -% 'e'          == "!!!!!!!!!!!"
+"%11.2f" -% 'B'          == "!!!!!!!!!!!"
+"%11.2f" -% 'f'          == "!!!!!!!!!!!"
+"%11.2f" -% '!'          == "!!!!!!!!!!!"
+"%11.2f" -% False        == "!!!!!!!!!!!"
+"%11.2f" -% True         == "!!!!!!!!!!!"
+
diff --git a/test/diff/examples-2c.out b/test/diff/examples-2c.out
new file mode 100644
--- /dev/null
+++ b/test/diff/examples-2c.out
@@ -0,0 +1,63 @@
+"%2c" -% ""           == "!!"
+"%2c" -% "a"          == "!!"
+"%2c" -% "aa"         == "!!"
+"%2c" -% " "          == "!!"
+"%2c" -% "aaa"        == "!!"
+"%2c" -% "a "         == "!!"
+"%2c" -% " a"         == "!!"
+"%2c" -% "b"          == "!!"
+"%2c" -% "aaaa"       == "!!"
+"%2c" -% "aa "        == "!!"
+"%2c" -% "a a"        == "!!"
+"%2c" -% "ab"         == "!!"
+"%2c" -% 0            == "!!"
+"%2c" -% 1            == "!!"
+"%2c" -% (-1)         == "!!"
+"%2c" -% 2            == "!!"
+"%2c" -% (-2)         == "!!"
+"%2c" -% 3            == "!!"
+"%2c" -% (-3)         == "!!"
+"%2c" -% 4            == "!!"
+"%2c" -% (-4)         == "!!"
+"%2c" -% 5            == "!!"
+"%2c" -% (-5)         == "!!"
+"%2c" -% 6            == "!!"
+"%2c" -% 0.0          == "!!"
+"%2c" -% 1.0          == "!!"
+"%2c" -% (-1.0)       == "!!"
+"%2c" -% Infinity     == "!!"
+"%2c" -% 0.5          == "!!"
+"%2c" -% 2.0          == "!!"
+"%2c" -% (-Infinity)  == "!!"
+"%2c" -% (-0.5)       == "!!"
+"%2c" -% (-2.0)       == "!!"
+"%2c" -% 0.33333334   == "!!"
+"%2c" -% 3.0          == "!!"
+"%2c" -% (-0.33333334) == "!!"
+"%2c" -% (0 % 1)      == "!!"
+"%2c" -% (1 % 1)      == "!!"
+"%2c" -% ((-1) % 1)   == "!!"
+"%2c" -% (1 % 2)      == "!!"
+"%2c" -% (2 % 1)      == "!!"
+"%2c" -% ((-1) % 2)   == "!!"
+"%2c" -% ((-2) % 1)   == "!!"
+"%2c" -% (1 % 3)      == "!!"
+"%2c" -% (3 % 1)      == "!!"
+"%2c" -% ((-1) % 3)   == "!!"
+"%2c" -% ((-3) % 1)   == "!!"
+"%2c" -% (1 % 4)      == "!!"
+"%2c" -% 'a'          == " a"
+"%2c" -% ' '          == "  "
+"%2c" -% 'b'          == " b"
+"%2c" -% 'A'          == " A"
+"%2c" -% 'c'          == " c"
+"%2c" -% '\n'         == " \n"
+"%2c" -% 'd'          == " d"
+"%2c" -% '0'          == " 0"
+"%2c" -% 'e'          == " e"
+"%2c" -% 'B'          == " B"
+"%2c" -% 'f'          == " f"
+"%2c" -% '!'          == " !"
+"%2c" -% False        == "!!"
+"%2c" -% True         == "!!"
+
diff --git a/test/diff/examples-3i.out b/test/diff/examples-3i.out
new file mode 100644
--- /dev/null
+++ b/test/diff/examples-3i.out
@@ -0,0 +1,63 @@
+"%3i" -% ""           == "!!!"
+"%3i" -% "a"          == "!!!"
+"%3i" -% "aa"         == "!!!"
+"%3i" -% " "          == "!!!"
+"%3i" -% "aaa"        == "!!!"
+"%3i" -% "a "         == "!!!"
+"%3i" -% " a"         == "!!!"
+"%3i" -% "b"          == "!!!"
+"%3i" -% "aaaa"       == "!!!"
+"%3i" -% "aa "        == "!!!"
+"%3i" -% "a a"        == "!!!"
+"%3i" -% "ab"         == "!!!"
+"%3i" -% 0            == "  0"
+"%3i" -% 1            == "  1"
+"%3i" -% (-1)         == " -1"
+"%3i" -% 2            == "  2"
+"%3i" -% (-2)         == " -2"
+"%3i" -% 3            == "  3"
+"%3i" -% (-3)         == " -3"
+"%3i" -% 4            == "  4"
+"%3i" -% (-4)         == " -4"
+"%3i" -% 5            == "  5"
+"%3i" -% (-5)         == " -5"
+"%3i" -% 6            == "  6"
+"%3i" -% 0.0          == "  0"
+"%3i" -% 1.0          == "  1"
+"%3i" -% (-1.0)       == " -1"
+"%3i" -% Infinity     == "Infinity"
+"%3i" -% 0.5          == "  0"
+"%3i" -% 2.0          == "  2"
+"%3i" -% (-Infinity)  == "-Infinity"
+"%3i" -% (-0.5)       == " -0"
+"%3i" -% (-2.0)       == " -2"
+"%3i" -% 0.33333334   == "  0"
+"%3i" -% 3.0          == "  3"
+"%3i" -% (-0.33333334) == " -0"
+"%3i" -% (0 % 1)      == "  0"
+"%3i" -% (1 % 1)      == "  1"
+"%3i" -% ((-1) % 1)   == " -1"
+"%3i" -% (1 % 2)      == "  0"
+"%3i" -% (2 % 1)      == "  2"
+"%3i" -% ((-1) % 2)   == " -0"
+"%3i" -% ((-2) % 1)   == " -2"
+"%3i" -% (1 % 3)      == "  0"
+"%3i" -% (3 % 1)      == "  3"
+"%3i" -% ((-1) % 3)   == " -0"
+"%3i" -% ((-3) % 1)   == " -3"
+"%3i" -% (1 % 4)      == "  0"
+"%3i" -% 'a'          == "!!!"
+"%3i" -% ' '          == "!!!"
+"%3i" -% 'b'          == "!!!"
+"%3i" -% 'A'          == "!!!"
+"%3i" -% 'c'          == "!!!"
+"%3i" -% '\n'         == "!!!"
+"%3i" -% 'd'          == "!!!"
+"%3i" -% '0'          == "!!!"
+"%3i" -% 'e'          == "!!!"
+"%3i" -% 'B'          == "!!!"
+"%3i" -% 'f'          == "!!!"
+"%3i" -% '!'          == "!!!"
+"%3i" -% False        == "!!!"
+"%3i" -% True         == "!!!"
+
diff --git a/test/diff/examples-5f.out b/test/diff/examples-5f.out
new file mode 100644
--- /dev/null
+++ b/test/diff/examples-5f.out
@@ -0,0 +1,63 @@
+"%5f" -% ""           == "!!!!!"
+"%5f" -% "a"          == "!!!!!"
+"%5f" -% "aa"         == "!!!!!"
+"%5f" -% " "          == "!!!!!"
+"%5f" -% "aaa"        == "!!!!!"
+"%5f" -% "a "         == "!!!!!"
+"%5f" -% " a"         == "!!!!!"
+"%5f" -% "b"          == "!!!!!"
+"%5f" -% "aaaa"       == "!!!!!"
+"%5f" -% "aa "        == "!!!!!"
+"%5f" -% "a a"        == "!!!!!"
+"%5f" -% "ab"         == "!!!!!"
+"%5f" -% 0            == "  0.0"
+"%5f" -% 1            == "  1.0"
+"%5f" -% (-1)         == " -1.0"
+"%5f" -% 2            == "  2.0"
+"%5f" -% (-2)         == " -2.0"
+"%5f" -% 3            == "  3.0"
+"%5f" -% (-3)         == " -3.0"
+"%5f" -% 4            == "  4.0"
+"%5f" -% (-4)         == " -4.0"
+"%5f" -% 5            == "  5.0"
+"%5f" -% (-5)         == " -5.0"
+"%5f" -% 6            == "  6.0"
+"%5f" -% 0.0          == "  0.0"
+"%5f" -% 1.0          == "  1.0"
+"%5f" -% (-1.0)       == " -1.0"
+"%5f" -% Infinity     == "Infinity"
+"%5f" -% 0.5          == "  0.5"
+"%5f" -% 2.0          == "  2.0"
+"%5f" -% (-Infinity)  == "-Infinity"
+"%5f" -% (-0.5)       == " -0.5"
+"%5f" -% (-2.0)       == " -2.0"
+"%5f" -% 0.33333334   == "0.33333334"
+"%5f" -% 3.0          == "  3.0"
+"%5f" -% (-0.33333334) == "-0.33333334"
+"%5f" -% (0 % 1)      == "  0.0"
+"%5f" -% (1 % 1)      == "  1.0"
+"%5f" -% ((-1) % 1)   == " -1.0"
+"%5f" -% (1 % 2)      == "  0.5"
+"%5f" -% (2 % 1)      == "  2.0"
+"%5f" -% ((-1) % 2)   == " -0.5"
+"%5f" -% ((-2) % 1)   == " -2.0"
+"%5f" -% (1 % 3)      == "    0"
+"%5f" -% (3 % 1)      == "  3.0"
+"%5f" -% ((-1) % 3)   == "   -0"
+"%5f" -% ((-3) % 1)   == " -3.0"
+"%5f" -% (1 % 4)      == " 0.25"
+"%5f" -% 'a'          == "!!!!!"
+"%5f" -% ' '          == "!!!!!"
+"%5f" -% 'b'          == "!!!!!"
+"%5f" -% 'A'          == "!!!!!"
+"%5f" -% 'c'          == "!!!!!"
+"%5f" -% '\n'         == "!!!!!"
+"%5f" -% 'd'          == "!!!!!"
+"%5f" -% '0'          == "!!!!!"
+"%5f" -% 'e'          == "!!!!!"
+"%5f" -% 'B'          == "!!!!!"
+"%5f" -% 'f'          == "!!!!!"
+"%5f" -% '!'          == "!!!!!"
+"%5f" -% False        == "!!!!!"
+"%5f" -% True         == "!!!!!"
+
diff --git a/test/diff/examples-6r.out b/test/diff/examples-6r.out
new file mode 100644
--- /dev/null
+++ b/test/diff/examples-6r.out
@@ -0,0 +1,63 @@
+"%6r" -% ""           == "    \"\""
+"%6r" -% "a"          == "   \"a\""
+"%6r" -% "aa"         == "  \"aa\""
+"%6r" -% " "          == "   \" \""
+"%6r" -% "aaa"        == " \"aaa\""
+"%6r" -% "a "         == "  \"a \""
+"%6r" -% " a"         == "  \" a\""
+"%6r" -% "b"          == "   \"b\""
+"%6r" -% "aaaa"       == "\"aaaa\""
+"%6r" -% "aa "        == " \"aa \""
+"%6r" -% "a a"        == " \"a a\""
+"%6r" -% "ab"         == "  \"ab\""
+"%6r" -% 0            == "     0"
+"%6r" -% 1            == "     1"
+"%6r" -% (-1)         == "    -1"
+"%6r" -% 2            == "     2"
+"%6r" -% (-2)         == "    -2"
+"%6r" -% 3            == "     3"
+"%6r" -% (-3)         == "    -3"
+"%6r" -% 4            == "     4"
+"%6r" -% (-4)         == "    -4"
+"%6r" -% 5            == "     5"
+"%6r" -% (-5)         == "    -5"
+"%6r" -% 6            == "     6"
+"%6r" -% 0.0          == "   0.0"
+"%6r" -% 1.0          == "   1.0"
+"%6r" -% (-1.0)       == "  -1.0"
+"%6r" -% Infinity     == "Infinity"
+"%6r" -% 0.5          == "   0.5"
+"%6r" -% 2.0          == "   2.0"
+"%6r" -% (-Infinity)  == "-Infinity"
+"%6r" -% (-0.5)       == "  -0.5"
+"%6r" -% (-2.0)       == "  -2.0"
+"%6r" -% 0.33333334   == "0.33333334"
+"%6r" -% 3.0          == "   3.0"
+"%6r" -% (-0.33333334) == "-0.33333334"
+"%6r" -% (0 % 1)      == " 0 % 1"
+"%6r" -% (1 % 1)      == " 1 % 1"
+"%6r" -% ((-1) % 1)   == "(-1) % 1"
+"%6r" -% (1 % 2)      == " 1 % 2"
+"%6r" -% (2 % 1)      == " 2 % 1"
+"%6r" -% ((-1) % 2)   == "(-1) % 2"
+"%6r" -% ((-2) % 1)   == "(-2) % 1"
+"%6r" -% (1 % 3)      == " 1 % 3"
+"%6r" -% (3 % 1)      == " 3 % 1"
+"%6r" -% ((-1) % 3)   == "(-1) % 3"
+"%6r" -% ((-3) % 1)   == "(-3) % 1"
+"%6r" -% (1 % 4)      == " 1 % 4"
+"%6r" -% 'a'          == "   'a'"
+"%6r" -% ' '          == "   ' '"
+"%6r" -% 'b'          == "   'b'"
+"%6r" -% 'A'          == "   'A'"
+"%6r" -% 'c'          == "   'c'"
+"%6r" -% '\n'         == "  '\\n'"
+"%6r" -% 'd'          == "   'd'"
+"%6r" -% '0'          == "   '0'"
+"%6r" -% 'e'          == "   'e'"
+"%6r" -% 'B'          == "   'B'"
+"%6r" -% 'f'          == "   'f'"
+"%6r" -% '!'          == "   '!'"
+"%6r" -% False        == " False"
+"%6r" -% True         == "  True"
+
diff --git a/test/diff/examples-6s.out b/test/diff/examples-6s.out
new file mode 100644
--- /dev/null
+++ b/test/diff/examples-6s.out
@@ -0,0 +1,63 @@
+"%6s" -% ""           == "      "
+"%6s" -% "a"          == "     a"
+"%6s" -% "aa"         == "    aa"
+"%6s" -% " "          == "      "
+"%6s" -% "aaa"        == "   aaa"
+"%6s" -% "a "         == "    a "
+"%6s" -% " a"         == "     a"
+"%6s" -% "b"          == "     b"
+"%6s" -% "aaaa"       == "  aaaa"
+"%6s" -% "aa "        == "   aa "
+"%6s" -% "a a"        == "   a a"
+"%6s" -% "ab"         == "    ab"
+"%6s" -% 0            == "     0"
+"%6s" -% 1            == "     1"
+"%6s" -% (-1)         == "    -1"
+"%6s" -% 2            == "     2"
+"%6s" -% (-2)         == "    -2"
+"%6s" -% 3            == "     3"
+"%6s" -% (-3)         == "    -3"
+"%6s" -% 4            == "     4"
+"%6s" -% (-4)         == "    -4"
+"%6s" -% 5            == "     5"
+"%6s" -% (-5)         == "    -5"
+"%6s" -% 6            == "     6"
+"%6s" -% 0.0          == "   0.0"
+"%6s" -% 1.0          == "   1.0"
+"%6s" -% (-1.0)       == "  -1.0"
+"%6s" -% Infinity     == "Infinity"
+"%6s" -% 0.5          == "   0.5"
+"%6s" -% 2.0          == "   2.0"
+"%6s" -% (-Infinity)  == "-Infinity"
+"%6s" -% (-0.5)       == "  -0.5"
+"%6s" -% (-2.0)       == "  -2.0"
+"%6s" -% 0.33333334   == "0.33333334"
+"%6s" -% 3.0          == "   3.0"
+"%6s" -% (-0.33333334) == "-0.33333334"
+"%6s" -% (0 % 1)      == " 0 % 1"
+"%6s" -% (1 % 1)      == " 1 % 1"
+"%6s" -% ((-1) % 1)   == "(-1) % 1"
+"%6s" -% (1 % 2)      == " 1 % 2"
+"%6s" -% (2 % 1)      == " 2 % 1"
+"%6s" -% ((-1) % 2)   == "(-1) % 2"
+"%6s" -% ((-2) % 1)   == "(-2) % 1"
+"%6s" -% (1 % 3)      == " 1 % 3"
+"%6s" -% (3 % 1)      == " 3 % 1"
+"%6s" -% ((-1) % 3)   == "(-1) % 3"
+"%6s" -% ((-3) % 1)   == "(-3) % 1"
+"%6s" -% (1 % 4)      == " 1 % 4"
+"%6s" -% 'a'          == "   'a'"
+"%6s" -% ' '          == "   ' '"
+"%6s" -% 'b'          == "   'b'"
+"%6s" -% 'A'          == "   'A'"
+"%6s" -% 'c'          == "   'c'"
+"%6s" -% '\n'         == "  '\\n'"
+"%6s" -% 'd'          == "   'd'"
+"%6s" -% '0'          == "   '0'"
+"%6s" -% 'e'          == "   'e'"
+"%6s" -% 'B'          == "   'B'"
+"%6s" -% 'f'          == "   'f'"
+"%6s" -% '!'          == "   '!'"
+"%6s" -% False        == " False"
+"%6s" -% True         == "  True"
+
diff --git a/test/diff/examples-X_.out b/test/diff/examples-X_.out
new file mode 100644
--- /dev/null
+++ b/test/diff/examples-X_.out
@@ -0,0 +1,63 @@
+"%X" -% ""           == "!"
+"%X" -% "a"          == "!"
+"%X" -% "aa"         == "!"
+"%X" -% " "          == "!"
+"%X" -% "aaa"        == "!"
+"%X" -% "a "         == "!"
+"%X" -% " a"         == "!"
+"%X" -% "b"          == "!"
+"%X" -% "aaaa"       == "!"
+"%X" -% "aa "        == "!"
+"%X" -% "a a"        == "!"
+"%X" -% "ab"         == "!"
+"%X" -% 0            == "0"
+"%X" -% 1            == "1"
+"%X" -% (-1)         == "-1"
+"%X" -% 2            == "2"
+"%X" -% (-2)         == "-2"
+"%X" -% 3            == "3"
+"%X" -% (-3)         == "-3"
+"%X" -% 4            == "4"
+"%X" -% (-4)         == "-4"
+"%X" -% 5            == "5"
+"%X" -% (-5)         == "-5"
+"%X" -% 6            == "6"
+"%X" -% 0.0          == "0"
+"%X" -% 1.0          == "1"
+"%X" -% 0.5          == "0.8"
+"%X" -% (-1.0)       == "-1"
+"%X" -% 1.5          == "1.8"
+"%X" -% 0.25         == "0.4"
+"%X" -% Infinity     == "Infinity"
+"%X" -% 2.0          == "2"
+"%X" -% (-0.5)       == "-0.8"
+"%X" -% 1.25         == "1.4"
+"%X" -% 0.75         == "0.C"
+"%X" -% (-Infinity)  == "-Infinity"
+"%X" -% (0 % 1)      == "0"
+"%X" -% (1 % 1)      == "1"
+"%X" -% ((-1) % 1)   == "-1"
+"%X" -% (1 % 2)      == "0.8"
+"%X" -% (2 % 1)      == "2"
+"%X" -% ((-1) % 2)   == "-0.8"
+"%X" -% ((-2) % 1)   == "-2"
+"%X" -% (1 % 3)      == "0"
+"%X" -% (3 % 1)      == "3"
+"%X" -% ((-1) % 3)   == "-0"
+"%X" -% ((-3) % 1)   == "-3"
+"%X" -% (1 % 4)      == "0.4"
+"%X" -% 'a'          == "!"
+"%X" -% ' '          == "!"
+"%X" -% 'b'          == "!"
+"%X" -% 'A'          == "!"
+"%X" -% 'c'          == "!"
+"%X" -% '\n'         == "!"
+"%X" -% 'd'          == "!"
+"%X" -% '0'          == "!"
+"%X" -% 'e'          == "!"
+"%X" -% 'B'          == "!"
+"%X" -% 'f'          == "!"
+"%X" -% '!'          == "!"
+"%X" -% False        == "!"
+"%X" -% True         == "!"
+
diff --git a/test/diff/examples-_3i.out b/test/diff/examples-_3i.out
new file mode 100644
--- /dev/null
+++ b/test/diff/examples-_3i.out
@@ -0,0 +1,63 @@
+"% 3i" -% ""           == "!!!"
+"% 3i" -% "a"          == "!!!"
+"% 3i" -% "aa"         == "!!!"
+"% 3i" -% " "          == "!!!"
+"% 3i" -% "aaa"        == "!!!"
+"% 3i" -% "a "         == "!!!"
+"% 3i" -% " a"         == "!!!"
+"% 3i" -% "b"          == "!!!"
+"% 3i" -% "aaaa"       == "!!!"
+"% 3i" -% "aa "        == "!!!"
+"% 3i" -% "a a"        == "!!!"
+"% 3i" -% "ab"         == "!!!"
+"% 3i" -% 0            == "  0"
+"% 3i" -% 1            == "  1"
+"% 3i" -% (-1)         == " -1"
+"% 3i" -% 2            == "  2"
+"% 3i" -% (-2)         == " -2"
+"% 3i" -% 3            == "  3"
+"% 3i" -% (-3)         == " -3"
+"% 3i" -% 4            == "  4"
+"% 3i" -% (-4)         == " -4"
+"% 3i" -% 5            == "  5"
+"% 3i" -% (-5)         == " -5"
+"% 3i" -% 6            == "  6"
+"% 3i" -% 0.0          == "  0"
+"% 3i" -% 1.0          == "  1"
+"% 3i" -% (-1.0)       == " -1"
+"% 3i" -% Infinity     == " Infinity"
+"% 3i" -% 0.5          == "  0"
+"% 3i" -% 2.0          == "  2"
+"% 3i" -% (-Infinity)  == "-Infinity"
+"% 3i" -% (-0.5)       == " -0"
+"% 3i" -% (-2.0)       == " -2"
+"% 3i" -% 0.33333334   == "  0"
+"% 3i" -% 3.0          == "  3"
+"% 3i" -% (-0.33333334) == " -0"
+"% 3i" -% (0 % 1)      == "  0"
+"% 3i" -% (1 % 1)      == "  1"
+"% 3i" -% ((-1) % 1)   == " -1"
+"% 3i" -% (1 % 2)      == "  0"
+"% 3i" -% (2 % 1)      == "  2"
+"% 3i" -% ((-1) % 2)   == " -0"
+"% 3i" -% ((-2) % 1)   == " -2"
+"% 3i" -% (1 % 3)      == "  0"
+"% 3i" -% (3 % 1)      == "  3"
+"% 3i" -% ((-1) % 3)   == " -0"
+"% 3i" -% ((-3) % 1)   == " -3"
+"% 3i" -% (1 % 4)      == "  0"
+"% 3i" -% 'a'          == "!!!"
+"% 3i" -% ' '          == "!!!"
+"% 3i" -% 'b'          == "!!!"
+"% 3i" -% 'A'          == "!!!"
+"% 3i" -% 'c'          == "!!!"
+"% 3i" -% '\n'         == "!!!"
+"% 3i" -% 'd'          == "!!!"
+"% 3i" -% '0'          == "!!!"
+"% 3i" -% 'e'          == "!!!"
+"% 3i" -% 'B'          == "!!!"
+"% 3i" -% 'f'          == "!!!"
+"% 3i" -% '!'          == "!!!"
+"% 3i" -% False        == "!!!"
+"% 3i" -% True         == "!!!"
+
diff --git a/test/diff/examples-abc.out b/test/diff/examples-abc.out
new file mode 100644
--- /dev/null
+++ b/test/diff/examples-abc.out
@@ -0,0 +1,63 @@
+"abc" -% ""           == "abc"
+"abc" -% "a"          == "abc"
+"abc" -% "aa"         == "abc"
+"abc" -% " "          == "abc"
+"abc" -% "aaa"        == "abc"
+"abc" -% "a "         == "abc"
+"abc" -% " a"         == "abc"
+"abc" -% "b"          == "abc"
+"abc" -% "aaaa"       == "abc"
+"abc" -% "aa "        == "abc"
+"abc" -% "a a"        == "abc"
+"abc" -% "ab"         == "abc"
+"abc" -% 0            == "abc"
+"abc" -% 1            == "abc"
+"abc" -% (-1)         == "abc"
+"abc" -% 2            == "abc"
+"abc" -% (-2)         == "abc"
+"abc" -% 3            == "abc"
+"abc" -% (-3)         == "abc"
+"abc" -% 4            == "abc"
+"abc" -% (-4)         == "abc"
+"abc" -% 5            == "abc"
+"abc" -% (-5)         == "abc"
+"abc" -% 6            == "abc"
+"abc" -% 0.0          == "abc"
+"abc" -% 1.0          == "abc"
+"abc" -% (-1.0)       == "abc"
+"abc" -% Infinity     == "abc"
+"abc" -% 0.5          == "abc"
+"abc" -% 2.0          == "abc"
+"abc" -% (-Infinity)  == "abc"
+"abc" -% (-0.5)       == "abc"
+"abc" -% (-2.0)       == "abc"
+"abc" -% 0.33333334   == "abc"
+"abc" -% 3.0          == "abc"
+"abc" -% (-0.33333334) == "abc"
+"abc" -% (0 % 1)      == "abc"
+"abc" -% (1 % 1)      == "abc"
+"abc" -% ((-1) % 1)   == "abc"
+"abc" -% (1 % 2)      == "abc"
+"abc" -% (2 % 1)      == "abc"
+"abc" -% ((-1) % 2)   == "abc"
+"abc" -% ((-2) % 1)   == "abc"
+"abc" -% (1 % 3)      == "abc"
+"abc" -% (3 % 1)      == "abc"
+"abc" -% ((-1) % 3)   == "abc"
+"abc" -% ((-3) % 1)   == "abc"
+"abc" -% (1 % 4)      == "abc"
+"abc" -% 'a'          == "abc"
+"abc" -% ' '          == "abc"
+"abc" -% 'b'          == "abc"
+"abc" -% 'A'          == "abc"
+"abc" -% 'c'          == "abc"
+"abc" -% '\n'         == "abc"
+"abc" -% 'd'          == "abc"
+"abc" -% '0'          == "abc"
+"abc" -% 'e'          == "abc"
+"abc" -% 'B'          == "abc"
+"abc" -% 'f'          == "abc"
+"abc" -% '!'          == "abc"
+"abc" -% False        == "abc"
+"abc" -% True         == "abc"
+
diff --git a/test/diff/examples-b.out b/test/diff/examples-b.out
new file mode 100644
--- /dev/null
+++ b/test/diff/examples-b.out
@@ -0,0 +1,63 @@
+"%b" -% ""           == "!"
+"%b" -% "a"          == "!"
+"%b" -% "aa"         == "!"
+"%b" -% " "          == "!"
+"%b" -% "aaa"        == "!"
+"%b" -% "a "         == "!"
+"%b" -% " a"         == "!"
+"%b" -% "b"          == "!"
+"%b" -% "aaaa"       == "!"
+"%b" -% "aa "        == "!"
+"%b" -% "a a"        == "!"
+"%b" -% "ab"         == "!"
+"%b" -% 0            == "0"
+"%b" -% 1            == "1"
+"%b" -% (-1)         == "-1"
+"%b" -% 2            == "10"
+"%b" -% (-2)         == "-10"
+"%b" -% 3            == "11"
+"%b" -% (-3)         == "-11"
+"%b" -% 4            == "100"
+"%b" -% (-4)         == "-100"
+"%b" -% 5            == "101"
+"%b" -% (-5)         == "-101"
+"%b" -% 6            == "110"
+"%b" -% 0.0          == "0"
+"%b" -% 1.0          == "1"
+"%b" -% 0.5          == "0.1"
+"%b" -% (-1.0)       == "-1"
+"%b" -% 1.5          == "1.1"
+"%b" -% 0.25         == "0.01"
+"%b" -% Infinity     == "Infinity"
+"%b" -% 2.0          == "10"
+"%b" -% (-0.5)       == "-0.1"
+"%b" -% 1.25         == "1.01"
+"%b" -% 0.75         == "0.11"
+"%b" -% (-Infinity)  == "-Infinity"
+"%b" -% (0 % 1)      == "0"
+"%b" -% (1 % 1)      == "1"
+"%b" -% ((-1) % 1)   == "-1"
+"%b" -% (1 % 2)      == "0.1"
+"%b" -% (2 % 1)      == "10"
+"%b" -% ((-1) % 2)   == "-0.1"
+"%b" -% ((-2) % 1)   == "-10"
+"%b" -% (1 % 3)      == "0"
+"%b" -% (3 % 1)      == "11"
+"%b" -% ((-1) % 3)   == "-0"
+"%b" -% ((-3) % 1)   == "-11"
+"%b" -% (1 % 4)      == "0.01"
+"%b" -% 'a'          == "!"
+"%b" -% ' '          == "!"
+"%b" -% 'b'          == "!"
+"%b" -% 'A'          == "!"
+"%b" -% 'c'          == "!"
+"%b" -% '\n'         == "!"
+"%b" -% 'd'          == "!"
+"%b" -% '0'          == "!"
+"%b" -% 'e'          == "!"
+"%b" -% 'B'          == "!"
+"%b" -% 'f'          == "!"
+"%b" -% '!'          == "!"
+"%b" -% False        == "!"
+"%b" -% True         == "!"
+
diff --git a/test/diff/examples-c.out b/test/diff/examples-c.out
new file mode 100644
--- /dev/null
+++ b/test/diff/examples-c.out
@@ -0,0 +1,63 @@
+"%c" -% ""           == "!"
+"%c" -% "a"          == "!"
+"%c" -% "aa"         == "!"
+"%c" -% " "          == "!"
+"%c" -% "aaa"        == "!"
+"%c" -% "a "         == "!"
+"%c" -% " a"         == "!"
+"%c" -% "b"          == "!"
+"%c" -% "aaaa"       == "!"
+"%c" -% "aa "        == "!"
+"%c" -% "a a"        == "!"
+"%c" -% "ab"         == "!"
+"%c" -% 0            == "!"
+"%c" -% 1            == "!"
+"%c" -% (-1)         == "!"
+"%c" -% 2            == "!"
+"%c" -% (-2)         == "!"
+"%c" -% 3            == "!"
+"%c" -% (-3)         == "!"
+"%c" -% 4            == "!"
+"%c" -% (-4)         == "!"
+"%c" -% 5            == "!"
+"%c" -% (-5)         == "!"
+"%c" -% 6            == "!"
+"%c" -% 0.0          == "!"
+"%c" -% 1.0          == "!"
+"%c" -% (-1.0)       == "!"
+"%c" -% Infinity     == "!"
+"%c" -% 0.5          == "!"
+"%c" -% 2.0          == "!"
+"%c" -% (-Infinity)  == "!"
+"%c" -% (-0.5)       == "!"
+"%c" -% (-2.0)       == "!"
+"%c" -% 0.33333334   == "!"
+"%c" -% 3.0          == "!"
+"%c" -% (-0.33333334) == "!"
+"%c" -% (0 % 1)      == "!"
+"%c" -% (1 % 1)      == "!"
+"%c" -% ((-1) % 1)   == "!"
+"%c" -% (1 % 2)      == "!"
+"%c" -% (2 % 1)      == "!"
+"%c" -% ((-1) % 2)   == "!"
+"%c" -% ((-2) % 1)   == "!"
+"%c" -% (1 % 3)      == "!"
+"%c" -% (3 % 1)      == "!"
+"%c" -% ((-1) % 3)   == "!"
+"%c" -% ((-3) % 1)   == "!"
+"%c" -% (1 % 4)      == "!"
+"%c" -% 'a'          == "a"
+"%c" -% ' '          == " "
+"%c" -% 'b'          == "b"
+"%c" -% 'A'          == "A"
+"%c" -% 'c'          == "c"
+"%c" -% '\n'         == "\n"
+"%c" -% 'd'          == "d"
+"%c" -% '0'          == "0"
+"%c" -% 'e'          == "e"
+"%c" -% 'B'          == "B"
+"%c" -% 'f'          == "f"
+"%c" -% '!'          == "!"
+"%c" -% False        == "!"
+"%c" -% True         == "!"
+
diff --git a/test/diff/examples-f.out b/test/diff/examples-f.out
new file mode 100644
--- /dev/null
+++ b/test/diff/examples-f.out
@@ -0,0 +1,63 @@
+"%f" -% ""           == "!"
+"%f" -% "a"          == "!"
+"%f" -% "aa"         == "!"
+"%f" -% " "          == "!"
+"%f" -% "aaa"        == "!"
+"%f" -% "a "         == "!"
+"%f" -% " a"         == "!"
+"%f" -% "b"          == "!"
+"%f" -% "aaaa"       == "!"
+"%f" -% "aa "        == "!"
+"%f" -% "a a"        == "!"
+"%f" -% "ab"         == "!"
+"%f" -% 0            == "0.0"
+"%f" -% 1            == "1.0"
+"%f" -% (-1)         == "-1.0"
+"%f" -% 2            == "2.0"
+"%f" -% (-2)         == "-2.0"
+"%f" -% 3            == "3.0"
+"%f" -% (-3)         == "-3.0"
+"%f" -% 4            == "4.0"
+"%f" -% (-4)         == "-4.0"
+"%f" -% 5            == "5.0"
+"%f" -% (-5)         == "-5.0"
+"%f" -% 6            == "6.0"
+"%f" -% 0.0          == "0.0"
+"%f" -% 1.0          == "1.0"
+"%f" -% (-1.0)       == "-1.0"
+"%f" -% Infinity     == "Infinity"
+"%f" -% 0.5          == "0.5"
+"%f" -% 2.0          == "2.0"
+"%f" -% (-Infinity)  == "-Infinity"
+"%f" -% (-0.5)       == "-0.5"
+"%f" -% (-2.0)       == "-2.0"
+"%f" -% 0.33333334   == "0.33333334"
+"%f" -% 3.0          == "3.0"
+"%f" -% (-0.33333334) == "-0.33333334"
+"%f" -% (0 % 1)      == "0.0"
+"%f" -% (1 % 1)      == "1.0"
+"%f" -% ((-1) % 1)   == "-1.0"
+"%f" -% (1 % 2)      == "0.5"
+"%f" -% (2 % 1)      == "2.0"
+"%f" -% ((-1) % 2)   == "-0.5"
+"%f" -% ((-2) % 1)   == "-2.0"
+"%f" -% (1 % 3)      == "0"
+"%f" -% (3 % 1)      == "3.0"
+"%f" -% ((-1) % 3)   == "-0"
+"%f" -% ((-3) % 1)   == "-3.0"
+"%f" -% (1 % 4)      == "0.25"
+"%f" -% 'a'          == "!"
+"%f" -% ' '          == "!"
+"%f" -% 'b'          == "!"
+"%f" -% 'A'          == "!"
+"%f" -% 'c'          == "!"
+"%f" -% '\n'         == "!"
+"%f" -% 'd'          == "!"
+"%f" -% '0'          == "!"
+"%f" -% 'e'          == "!"
+"%f" -% 'B'          == "!"
+"%f" -% 'f'          == "!"
+"%f" -% '!'          == "!"
+"%f" -% False        == "!"
+"%f" -% True         == "!"
+
diff --git a/test/diff/examples-i.out b/test/diff/examples-i.out
new file mode 100644
--- /dev/null
+++ b/test/diff/examples-i.out
@@ -0,0 +1,63 @@
+"%i" -% ""           == "!"
+"%i" -% "a"          == "!"
+"%i" -% "aa"         == "!"
+"%i" -% " "          == "!"
+"%i" -% "aaa"        == "!"
+"%i" -% "a "         == "!"
+"%i" -% " a"         == "!"
+"%i" -% "b"          == "!"
+"%i" -% "aaaa"       == "!"
+"%i" -% "aa "        == "!"
+"%i" -% "a a"        == "!"
+"%i" -% "ab"         == "!"
+"%i" -% 0            == "0"
+"%i" -% 1            == "1"
+"%i" -% (-1)         == "-1"
+"%i" -% 2            == "2"
+"%i" -% (-2)         == "-2"
+"%i" -% 3            == "3"
+"%i" -% (-3)         == "-3"
+"%i" -% 4            == "4"
+"%i" -% (-4)         == "-4"
+"%i" -% 5            == "5"
+"%i" -% (-5)         == "-5"
+"%i" -% 6            == "6"
+"%i" -% 0.0          == "0"
+"%i" -% 1.0          == "1"
+"%i" -% (-1.0)       == "-1"
+"%i" -% Infinity     == "Infinity"
+"%i" -% 0.5          == "0"
+"%i" -% 2.0          == "2"
+"%i" -% (-Infinity)  == "-Infinity"
+"%i" -% (-0.5)       == "-0"
+"%i" -% (-2.0)       == "-2"
+"%i" -% 0.33333334   == "0"
+"%i" -% 3.0          == "3"
+"%i" -% (-0.33333334) == "-0"
+"%i" -% (0 % 1)      == "0"
+"%i" -% (1 % 1)      == "1"
+"%i" -% ((-1) % 1)   == "-1"
+"%i" -% (1 % 2)      == "0"
+"%i" -% (2 % 1)      == "2"
+"%i" -% ((-1) % 2)   == "-0"
+"%i" -% ((-2) % 1)   == "-2"
+"%i" -% (1 % 3)      == "0"
+"%i" -% (3 % 1)      == "3"
+"%i" -% ((-1) % 3)   == "-0"
+"%i" -% ((-3) % 1)   == "-3"
+"%i" -% (1 % 4)      == "0"
+"%i" -% 'a'          == "!"
+"%i" -% ' '          == "!"
+"%i" -% 'b'          == "!"
+"%i" -% 'A'          == "!"
+"%i" -% 'c'          == "!"
+"%i" -% '\n'         == "!"
+"%i" -% 'd'          == "!"
+"%i" -% '0'          == "!"
+"%i" -% 'e'          == "!"
+"%i" -% 'B'          == "!"
+"%i" -% 'f'          == "!"
+"%i" -% '!'          == "!"
+"%i" -% False        == "!"
+"%i" -% True         == "!"
+
diff --git a/test/diff/examples-o.out b/test/diff/examples-o.out
new file mode 100644
--- /dev/null
+++ b/test/diff/examples-o.out
@@ -0,0 +1,63 @@
+"%o" -% ""           == "!"
+"%o" -% "a"          == "!"
+"%o" -% "aa"         == "!"
+"%o" -% " "          == "!"
+"%o" -% "aaa"        == "!"
+"%o" -% "a "         == "!"
+"%o" -% " a"         == "!"
+"%o" -% "b"          == "!"
+"%o" -% "aaaa"       == "!"
+"%o" -% "aa "        == "!"
+"%o" -% "a a"        == "!"
+"%o" -% "ab"         == "!"
+"%o" -% 0            == "0"
+"%o" -% 1            == "1"
+"%o" -% (-1)         == "-1"
+"%o" -% 2            == "2"
+"%o" -% (-2)         == "-2"
+"%o" -% 3            == "3"
+"%o" -% (-3)         == "-3"
+"%o" -% 4            == "4"
+"%o" -% (-4)         == "-4"
+"%o" -% 5            == "5"
+"%o" -% (-5)         == "-5"
+"%o" -% 6            == "6"
+"%o" -% 0.0          == "0"
+"%o" -% 1.0          == "1"
+"%o" -% 0.5          == "0.4"
+"%o" -% (-1.0)       == "-1"
+"%o" -% 1.5          == "1.4"
+"%o" -% 0.25         == "0.2"
+"%o" -% Infinity     == "Infinity"
+"%o" -% 2.0          == "2"
+"%o" -% (-0.5)       == "-0.4"
+"%o" -% 1.25         == "1.2"
+"%o" -% 0.75         == "0.6"
+"%o" -% (-Infinity)  == "-Infinity"
+"%o" -% (0 % 1)      == "0"
+"%o" -% (1 % 1)      == "1"
+"%o" -% ((-1) % 1)   == "-1"
+"%o" -% (1 % 2)      == "0.4"
+"%o" -% (2 % 1)      == "2"
+"%o" -% ((-1) % 2)   == "-0.4"
+"%o" -% ((-2) % 1)   == "-2"
+"%o" -% (1 % 3)      == "0"
+"%o" -% (3 % 1)      == "3"
+"%o" -% ((-1) % 3)   == "-0"
+"%o" -% ((-3) % 1)   == "-3"
+"%o" -% (1 % 4)      == "0.2"
+"%o" -% 'a'          == "!"
+"%o" -% ' '          == "!"
+"%o" -% 'b'          == "!"
+"%o" -% 'A'          == "!"
+"%o" -% 'c'          == "!"
+"%o" -% '\n'         == "!"
+"%o" -% 'd'          == "!"
+"%o" -% '0'          == "!"
+"%o" -% 'e'          == "!"
+"%o" -% 'B'          == "!"
+"%o" -% 'f'          == "!"
+"%o" -% '!'          == "!"
+"%o" -% False        == "!"
+"%o" -% True         == "!"
+
diff --git a/test/diff/examples-r.out b/test/diff/examples-r.out
new file mode 100644
--- /dev/null
+++ b/test/diff/examples-r.out
@@ -0,0 +1,63 @@
+"%r" -% ""           == "\"\""
+"%r" -% "a"          == "\"a\""
+"%r" -% "aa"         == "\"aa\""
+"%r" -% " "          == "\" \""
+"%r" -% "aaa"        == "\"aaa\""
+"%r" -% "a "         == "\"a \""
+"%r" -% " a"         == "\" a\""
+"%r" -% "b"          == "\"b\""
+"%r" -% "aaaa"       == "\"aaaa\""
+"%r" -% "aa "        == "\"aa \""
+"%r" -% "a a"        == "\"a a\""
+"%r" -% "ab"         == "\"ab\""
+"%r" -% 0            == "0"
+"%r" -% 1            == "1"
+"%r" -% (-1)         == "-1"
+"%r" -% 2            == "2"
+"%r" -% (-2)         == "-2"
+"%r" -% 3            == "3"
+"%r" -% (-3)         == "-3"
+"%r" -% 4            == "4"
+"%r" -% (-4)         == "-4"
+"%r" -% 5            == "5"
+"%r" -% (-5)         == "-5"
+"%r" -% 6            == "6"
+"%r" -% 0.0          == "0.0"
+"%r" -% 1.0          == "1.0"
+"%r" -% (-1.0)       == "-1.0"
+"%r" -% Infinity     == "Infinity"
+"%r" -% 0.5          == "0.5"
+"%r" -% 2.0          == "2.0"
+"%r" -% (-Infinity)  == "-Infinity"
+"%r" -% (-0.5)       == "-0.5"
+"%r" -% (-2.0)       == "-2.0"
+"%r" -% 0.33333334   == "0.33333334"
+"%r" -% 3.0          == "3.0"
+"%r" -% (-0.33333334) == "-0.33333334"
+"%r" -% (0 % 1)      == "0 % 1"
+"%r" -% (1 % 1)      == "1 % 1"
+"%r" -% ((-1) % 1)   == "(-1) % 1"
+"%r" -% (1 % 2)      == "1 % 2"
+"%r" -% (2 % 1)      == "2 % 1"
+"%r" -% ((-1) % 2)   == "(-1) % 2"
+"%r" -% ((-2) % 1)   == "(-2) % 1"
+"%r" -% (1 % 3)      == "1 % 3"
+"%r" -% (3 % 1)      == "3 % 1"
+"%r" -% ((-1) % 3)   == "(-1) % 3"
+"%r" -% ((-3) % 1)   == "(-3) % 1"
+"%r" -% (1 % 4)      == "1 % 4"
+"%r" -% 'a'          == "'a'"
+"%r" -% ' '          == "' '"
+"%r" -% 'b'          == "'b'"
+"%r" -% 'A'          == "'A'"
+"%r" -% 'c'          == "'c'"
+"%r" -% '\n'         == "'\\n'"
+"%r" -% 'd'          == "'d'"
+"%r" -% '0'          == "'0'"
+"%r" -% 'e'          == "'e'"
+"%r" -% 'B'          == "'B'"
+"%r" -% 'f'          == "'f'"
+"%r" -% '!'          == "'!'"
+"%r" -% False        == "False"
+"%r" -% True         == "True"
+
diff --git a/test/diff/examples-s.out b/test/diff/examples-s.out
new file mode 100644
--- /dev/null
+++ b/test/diff/examples-s.out
@@ -0,0 +1,63 @@
+"%s" -% ""           == ""
+"%s" -% "a"          == "a"
+"%s" -% "aa"         == "aa"
+"%s" -% " "          == " "
+"%s" -% "aaa"        == "aaa"
+"%s" -% "a "         == "a "
+"%s" -% " a"         == " a"
+"%s" -% "b"          == "b"
+"%s" -% "aaaa"       == "aaaa"
+"%s" -% "aa "        == "aa "
+"%s" -% "a a"        == "a a"
+"%s" -% "ab"         == "ab"
+"%s" -% 0            == "0"
+"%s" -% 1            == "1"
+"%s" -% (-1)         == "-1"
+"%s" -% 2            == "2"
+"%s" -% (-2)         == "-2"
+"%s" -% 3            == "3"
+"%s" -% (-3)         == "-3"
+"%s" -% 4            == "4"
+"%s" -% (-4)         == "-4"
+"%s" -% 5            == "5"
+"%s" -% (-5)         == "-5"
+"%s" -% 6            == "6"
+"%s" -% 0.0          == "0.0"
+"%s" -% 1.0          == "1.0"
+"%s" -% (-1.0)       == "-1.0"
+"%s" -% Infinity     == "Infinity"
+"%s" -% 0.5          == "0.5"
+"%s" -% 2.0          == "2.0"
+"%s" -% (-Infinity)  == "-Infinity"
+"%s" -% (-0.5)       == "-0.5"
+"%s" -% (-2.0)       == "-2.0"
+"%s" -% 0.33333334   == "0.33333334"
+"%s" -% 3.0          == "3.0"
+"%s" -% (-0.33333334) == "-0.33333334"
+"%s" -% (0 % 1)      == "0 % 1"
+"%s" -% (1 % 1)      == "1 % 1"
+"%s" -% ((-1) % 1)   == "(-1) % 1"
+"%s" -% (1 % 2)      == "1 % 2"
+"%s" -% (2 % 1)      == "2 % 1"
+"%s" -% ((-1) % 2)   == "(-1) % 2"
+"%s" -% ((-2) % 1)   == "(-2) % 1"
+"%s" -% (1 % 3)      == "1 % 3"
+"%s" -% (3 % 1)      == "3 % 1"
+"%s" -% ((-1) % 3)   == "(-1) % 3"
+"%s" -% ((-3) % 1)   == "(-3) % 1"
+"%s" -% (1 % 4)      == "1 % 4"
+"%s" -% 'a'          == "'a'"
+"%s" -% ' '          == "' '"
+"%s" -% 'b'          == "'b'"
+"%s" -% 'A'          == "'A'"
+"%s" -% 'c'          == "'c'"
+"%s" -% '\n'         == "'\\n'"
+"%s" -% 'd'          == "'d'"
+"%s" -% '0'          == "'0'"
+"%s" -% 'e'          == "'e'"
+"%s" -% 'B'          == "'B'"
+"%s" -% 'f'          == "'f'"
+"%s" -% '!'          == "'!'"
+"%s" -% False        == "False"
+"%s" -% True         == "True"
+
diff --git a/test/diff/examples-x.out b/test/diff/examples-x.out
new file mode 100644
--- /dev/null
+++ b/test/diff/examples-x.out
@@ -0,0 +1,63 @@
+"%x" -% ""           == "!"
+"%x" -% "a"          == "!"
+"%x" -% "aa"         == "!"
+"%x" -% " "          == "!"
+"%x" -% "aaa"        == "!"
+"%x" -% "a "         == "!"
+"%x" -% " a"         == "!"
+"%x" -% "b"          == "!"
+"%x" -% "aaaa"       == "!"
+"%x" -% "aa "        == "!"
+"%x" -% "a a"        == "!"
+"%x" -% "ab"         == "!"
+"%x" -% 0            == "0"
+"%x" -% 1            == "1"
+"%x" -% (-1)         == "-1"
+"%x" -% 2            == "2"
+"%x" -% (-2)         == "-2"
+"%x" -% 3            == "3"
+"%x" -% (-3)         == "-3"
+"%x" -% 4            == "4"
+"%x" -% (-4)         == "-4"
+"%x" -% 5            == "5"
+"%x" -% (-5)         == "-5"
+"%x" -% 6            == "6"
+"%x" -% 0.0          == "0"
+"%x" -% 1.0          == "1"
+"%x" -% 0.5          == "0.8"
+"%x" -% (-1.0)       == "-1"
+"%x" -% 1.5          == "1.8"
+"%x" -% 0.25         == "0.4"
+"%x" -% Infinity     == "Infinity"
+"%x" -% 2.0          == "2"
+"%x" -% (-0.5)       == "-0.8"
+"%x" -% 1.25         == "1.4"
+"%x" -% 0.75         == "0.c"
+"%x" -% (-Infinity)  == "-Infinity"
+"%x" -% (0 % 1)      == "0"
+"%x" -% (1 % 1)      == "1"
+"%x" -% ((-1) % 1)   == "-1"
+"%x" -% (1 % 2)      == "0.8"
+"%x" -% (2 % 1)      == "2"
+"%x" -% ((-1) % 2)   == "-0.8"
+"%x" -% ((-2) % 1)   == "-2"
+"%x" -% (1 % 3)      == "0"
+"%x" -% (3 % 1)      == "3"
+"%x" -% ((-1) % 3)   == "-0"
+"%x" -% ((-3) % 1)   == "-3"
+"%x" -% (1 % 4)      == "0.4"
+"%x" -% 'a'          == "!"
+"%x" -% ' '          == "!"
+"%x" -% 'b'          == "!"
+"%x" -% 'A'          == "!"
+"%x" -% 'c'          == "!"
+"%x" -% '\n'         == "!"
+"%x" -% 'd'          == "!"
+"%x" -% '0'          == "!"
+"%x" -% 'e'          == "!"
+"%x" -% 'B'          == "!"
+"%x" -% 'f'          == "!"
+"%x" -% '!'          == "!"
+"%x" -% False        == "!"
+"%x" -% True         == "!"
+
diff --git a/test/diff/examples.out b/test/diff/examples.out
new file mode 100644
--- /dev/null
+++ b/test/diff/examples.out
@@ -0,0 +1,63 @@
+"%r" -% ""           == "\"\""
+"%r" -% "a"          == "\"a\""
+"%r" -% "aa"         == "\"aa\""
+"%r" -% " "          == "\" \""
+"%r" -% "aaa"        == "\"aaa\""
+"%r" -% "a "         == "\"a \""
+"%r" -% " a"         == "\" a\""
+"%r" -% "b"          == "\"b\""
+"%r" -% "aaaa"       == "\"aaaa\""
+"%r" -% "aa "        == "\"aa \""
+"%r" -% "a a"        == "\"a a\""
+"%r" -% "ab"         == "\"ab\""
+"%r" -% 0            == "0"
+"%r" -% 1            == "1"
+"%r" -% (-1)         == "-1"
+"%r" -% 2            == "2"
+"%r" -% (-2)         == "-2"
+"%r" -% 3            == "3"
+"%r" -% (-3)         == "-3"
+"%r" -% 4            == "4"
+"%r" -% (-4)         == "-4"
+"%r" -% 5            == "5"
+"%r" -% (-5)         == "-5"
+"%r" -% 6            == "6"
+"%r" -% 0.0          == "0.0"
+"%r" -% 1.0          == "1.0"
+"%r" -% (-1.0)       == "-1.0"
+"%r" -% Infinity     == "Infinity"
+"%r" -% 0.5          == "0.5"
+"%r" -% 2.0          == "2.0"
+"%r" -% (-Infinity)  == "-Infinity"
+"%r" -% (-0.5)       == "-0.5"
+"%r" -% (-2.0)       == "-2.0"
+"%r" -% 0.33333334   == "0.33333334"
+"%r" -% 3.0          == "3.0"
+"%r" -% (-0.33333334) == "-0.33333334"
+"%r" -% (0 % 1)      == "0 % 1"
+"%r" -% (1 % 1)      == "1 % 1"
+"%r" -% ((-1) % 1)   == "(-1) % 1"
+"%r" -% (1 % 2)      == "1 % 2"
+"%r" -% (2 % 1)      == "2 % 1"
+"%r" -% ((-1) % 2)   == "(-1) % 2"
+"%r" -% ((-2) % 1)   == "(-2) % 1"
+"%r" -% (1 % 3)      == "1 % 3"
+"%r" -% (3 % 1)      == "3 % 1"
+"%r" -% ((-1) % 3)   == "(-1) % 3"
+"%r" -% ((-3) % 1)   == "(-3) % 1"
+"%r" -% (1 % 4)      == "1 % 4"
+"%r" -% 'a'          == "'a'"
+"%r" -% ' '          == "' '"
+"%r" -% 'b'          == "'b'"
+"%r" -% 'A'          == "'A'"
+"%r" -% 'c'          == "'c'"
+"%r" -% '\n'         == "'\\n'"
+"%r" -% 'd'          == "'d'"
+"%r" -% '0'          == "'0'"
+"%r" -% 'e'          == "'e'"
+"%r" -% 'B'          == "'B'"
+"%r" -% 'f'          == "'f'"
+"%r" -% '!'          == "'!'"
+"%r" -% False        == "False"
+"%r" -% True         == "True"
+
diff --git a/test/number.hs b/test/number.hs
new file mode 100644
--- /dev/null
+++ b/test/number.hs
@@ -0,0 +1,186 @@
+-- Copyright (c) 2018 Rudy Matela.
+-- Distributed under the 3-Clause BSD licence (see the file LICENSE).
+import Test
+
+import Text.PercentFormat
+import Text.PercentFormat.Quotient (Quotient)
+import Data.List (isInfixOf)
+
+import qualified Data.Ratio as R
+
+main :: IO ()
+main = reportTests tests
+
+tests :: [Bool]
+tests =
+  [ True
+
+  -- single digits, positives
+  , "%i" % 1 == "1"
+  , "%d" % 2 == "2"
+  , "%x" % 3 == "3"
+  , "%o" % 4 == "4"
+  , "%b" % 5 == "101"
+  , "%f" % 6 == "6.0"
+
+  -- double digits, positives
+  , "%i" % 12 == "12"
+  , "%d" % 23 == "23"
+  , "%x" % 34 == "22"
+  , "%o" % 45 == "55"
+  , "%b" % 56 == "111000"
+  , "%f" % 67 == "67.0"
+
+  -- single digits, negatives
+  , "%i" % (-1) == "-1"
+  , "%d" % (-2) == "-2"
+  , "%x" % (-3) == "-3"
+  , "%o" % (-4) == "-4"
+  , "%b" % (-5) == "-101"
+  , "%f" % (-6) == "-6.0"
+
+  -- double digits, negatives
+  , "%i" % (-12) == "-12"
+  , "%d" % (-23) == "-23"
+  , "%x" % (-34) == "-22"
+  , "%o" % (-45) == "-55"
+  , "%b" % (-56) == "-111000"
+  , "%f" % (-67) == "-67.0"
+
+  -- Infinity
+  , "%f" % (1.0 / 0.0) == "Infinity"
+  , "%i" % (1.0 / 0.0) == "Infinity"
+  , "%d" % (1.0 / 0.0) == "Infinity"
+  , "%x" % (1.0 / 0.0) == "Infinity"
+  , "%o" % (1.0 / 0.0) == "Infinity"
+  , and $ [ "%%%i%c" -%% (n,c) -% (1.0 / 0.0) == "Infinity"
+          | n <- [-7..7], c <- "idxobf" ]
+
+  -- -Infinity
+  , "%f" % (-1.0 / 0.0) == "-Infinity"
+  , "%i" % (-1.0 / 0.0) == "-Infinity"
+  , "%d" % (-1.0 / 0.0) == "-Infinity"
+  , "%x" % (-1.0 / 0.0) == "-Infinity"
+  , "%o" % (-1.0 / 0.0) == "-Infinity"
+
+  -- NaN
+  , "%f" % (0.0 / 0.0) == "NaN"
+  , "%i" % (0.0 / 0.0) == "NaN"
+  , "%d" % (0.0 / 0.0) == "NaN"
+  , "%x" % (0.0 / 0.0) == "NaN"
+  , "%o" % (0.0 / 0.0) == "NaN"
+  , and $ [ "NaN" `isInfixOf` ("%%%i%c" -%% (n,c) -% (0.0 / 0.0))
+          | n <- [-7..7], c <- "idxobf" ]
+
+  -- decimal fractional digits
+  , "%f" % 1 == "1.0"
+  , "%f" % 1.1 == "1.1"
+  , "%f" % (10.0 / 3.0) == show (10.0 / 3.0)
+  , "%.3f" % (10.0 / 3.0) == "3.333"
+  , "%1.2f" % 1.1 == "1.10"
+  , "%06.3f" % 1.23 == "01.230"
+  , "%.1f" % 1.14 == "1.1"
+  , "%.3f" % (-1.2) == "-1.200"
+  , "%.1f" % 1.16 == "1.2"
+  , "%.1f" % 1.15 == "1.2"  -- round to the nearest even number
+  , "%.1f" % 1.25 == "1.2"  -- round to the nearest even number
+  , "%15.7f" % 1234567.1234567 == "1234567.1234567"
+  , "%17.8f" % (12345678.12345678 :: Quotient) == "12345678.12345678"
+--, "%17.8f" % 12345678.12345678 == "12345678.12345678"  -- GHC
+--, "%17.8f" % 12345678.12345678 == "12345678.12345680"  -- Hugs
+
+  -- fractional digits in other bases
+  , "%.2x" % (1.0 / 200.0) == "0.01"
+  , "%.2x" % (3.0 / 200.0) == "0.04"
+  , "%.8b" % (1.0 / 200.0) == "0.00000001"
+  , "%.8b" % (3.0 / 200.0) == "0.00000100"
+  , "%.1x" % (3.0 / 2.0) == "1.8"
+  , "%.1b" % (3.0 / 2.0) == "1.1"
+  , "%.0b" % (3.0 / 2.0) == "10"
+  , "%.0b" % (1.0 / 2.0) == "0"
+
+  -- %i rounds to the nearest integer, unless precision is specified
+  , "%i"   % 3.1 == "3"
+  , "%.*i" % 3.1 == "3.1"
+  , "%.2i" % 3.1 == "3.10"
+  , "%.*i" % 3.141 == "3.141"
+  , "%.2i" % 3.141 == "3.14"
+
+  -- %f shows a minimum of one fractional digit
+  , "%f" % 6 == "6.0"
+  , "%f" % 12 == "12.0"
+
+  -- positive/negative signal placement
+  , "%+i" % 1 == "+1"
+  , "% i" % 1 == " 1"
+  , "%+f" % 1.2 == "+1.2"
+  , "% f" % 1.2 == " 1.2"
+  , "%3d" % (-1) == " -1"
+  , "%4d" % (-1) == "  -1"
+  , "%03d" % (-1) == "-01"
+  , "%04d" % (-1) == "-001"
+  , "%+3d" % 1 == " +1"
+  , "%+4d" % 1 == "  +1"
+  , "%+03d" % 1 == "+01"
+  , "%+04d" % 1 == "+001"
+  , "% 07.3f" %   3.3  == " 03.300"
+  , "% 07.3f" % (-3.3) == "-03.300"
+  , "% 7.3f"  %   3.3  == "  3.300"
+  , "% 7.3f"  % (-3.3) == " -3.300"
+
+  , "%07.3d" -% 10.5 == "010.500"
+  , "%07.3x" -% 10.5 == "00a.800"
+  , "%07.3b" -% 10.5 == "1010.100"
+
+  -- Ratios
+  , "asdf %r qwer" -% (10 R.% 3) == "asdf 10 % 3 qwer"
+  , "asdf %07.3f qwer" -% (10 R.% 3) == "asdf 003.333 qwer"
+
+  , "%x" -% 0xfedcba9876543210 == "fedcba9876543210"
+  , "%X" -% 0xFEDCBA9876543210 == "FEDCBA9876543210"
+
+  , "%i"    % pi == "3"
+  , "%.8d"  % pi == "3.14159265"
+--, "%d"    % pi == "3.14159265358979"   -- Hugs
+--, "%d"    % pi == "3.141592653589793"  -- GHC
+  , "%.8x" % pi == "3.243f6a89"
+  , "%.12b" % pi == "11.001001000100"
+
+
+-- TODO: in the future, also handle Ratios nicely:
+-- NOTE: use 360 or 5040 as a default divisor (max precision)
+-- '/' can be just an alias for '.'
+--, "%q" % (2/3 :: Rational) == "2/3"
+--, "%q" % (2/3 :: Rational) == "2/3"
+--, "%Q" % (2/3 :: Rational) == "2 % 3"
+--, "%q" % 0.333 == "1/3"
+--, "%q" % 0 == "0/1"
+--, "%q" % 1 == "1/1"
+--, "%q" % 2 == "2/1"
+--, "%/12q" % 0.333 == "1/3"
+--, "%/3q" % (3/12) == "1/3"
+--, "%4/3q" % (3/12) == " 1/3"
+-- why not use /N for exact precision?
+-- one can just format manually using %i/%i
+-- or even use %/*q
+
+  -- error handling
+  , "%i"   % "a" == "!"
+  , "%d"   % "a" == "!"
+  , "%x"   % "a" == "!"
+  , "%o"   % "a" == "!"
+  , "%b"   % "a" == "!"
+  , "%f"   % "a" == "!"
+  , "%1i"  % "b" == "!"
+  , "%2d"  % "c" == "!!"
+  , "%3x"  % " " == "!!!"
+  , "%4o"  % "!" == "!!!!"
+  , "%5b"  % "." == "!!!!!"
+  , "%6f"  % "-" == "!!!!!!"
+  , "%01f" % "A" == "!"
+  , "%02b" % "B" == "!!"
+  , "%03o" % "C" == "!!!"
+  , "%04x" % "%" == "!!!!"
+  , "%05d" % "/" == "!!!!!"
+  , "%06i" % "^" == "!!!!!!"
+  ]
diff --git a/test/prop.hs b/test/prop.hs
new file mode 100644
--- /dev/null
+++ b/test/prop.hs
@@ -0,0 +1,26 @@
+-- Copyright (c) 2018 Rudy Matela.
+-- Distributed under the 3-Clause BSD licence (see the file LICENSE).
+import Test
+import Text.PercentFormat
+import Test.LeanCheck
+
+main :: IO ()
+main = reportTests (tests 10000)
+
+tests :: Int -> [Bool]
+tests n =
+  [ True
+  , holds n $ \s -> s == "%s" -% s
+  , holds n $ \s t -> s ++ t == "%s%s" % s -% t
+  , holds n $ \s t -> s ++ "%" ++ t == "%s%%%s" % s -% t
+  , holds n $ \s -> s ++ s == "%s%s" % s -% s
+  , holds n $ \s1 s2 s3 -> s1 ++ s2 ++ s3 == (s1 ++ "%s" ++ s3) -% s2
+  , holds n $ \s -> show s == "%r" -% (s::String)
+  , holds n $ \x -> show x == "%r" -% (x::Int)
+  , holds n $ \c -> show c == "%r" -% (c::Char)
+  , holds n $ \f -> show f == "%r" -% (f::Float)
+  , holds n $ \i -> show i == "%i" -% (i::Int)
+  , holds n $ \f -> 'e' `notElem` show f -- TODO: == %f or == %e
+                ==> show f == "%f" -% (f::Float)
+  , holds n $ \c -> c:""   == "%c" -% (c::Char)
+  ]
diff --git a/test/quotient.hs b/test/quotient.hs
new file mode 100644
--- /dev/null
+++ b/test/quotient.hs
@@ -0,0 +1,56 @@
+-- Copyright (c) 2018 Rudy Matela.
+-- Distributed under the 3-Clause BSD licence (see the file LICENSE).
+import Test
+
+import Test.LeanCheck
+import Test.LeanCheck.Utils
+
+import Text.PercentFormat.Quotient as Q
+import Text.PercentFormat.Utils
+
+quotient :: Quotient
+quotient  =  error "dummy quotient value"
+
+instance Listable Quotient where
+  tiers  =  mapT (uncurry (Q.%)) . reset
+         $  tiers `suchThat` canonical
+    where
+    --canonical (0,0)  =  True
+    --canonical (1,0)  =  True
+    canonical (n,d)  =  d > 0 && n `gcd` d == 1
+
+main :: IO ()
+main = reportTests (tests 360)
+
+tests :: Int -> [Bool]
+tests n =
+  [ True
+
+  , holds n $ isCommutative ((+) -:> quotient)
+  , holds n $ isAssociative ((+) -:> quotient)
+  , holds n $ isCommutative ((*) -:> quotient)
+  , holds n $ isAssociative ((*) -:> quotient)
+  , holds n $ (*) `isDistributiveOver` ((+) -:> quotient)
+  , holds n $ isIdempotent (+0) -:> quotient
+  , holds n $ isIdempotent (*1) -:> quotient
+  , holds n $ isIdempotent abs -:> quotient
+  , holds n $ isIdempotent signum -:> quotient
+  , holds n $ \x -> negate (negate x) == (x -: quotient)
+  , holds n $ \x -> abs x * signum x == (x -: quotient)
+
+  , holds n $ \q r s -> none Q.isNaN [q,r,s] ==> okEqOrd q r s
+--, holds n $ okNum -:> quotient  -- TODO: when new LeanCheck is released
+
+  , readQ "Infinity" == infinity
+  , readQ "-Infinity" == -infinity
+  , let nan' = readQ "NaN" in nan' /= nan'
+  , maybeReadQ "blah" == Nothing
+  , readQ "10" == 10
+  , readQ "-300" == (-300)
+  , readQ "10.10" == 101 % 10
+  , readQ "10.1" == 101 % 10
+  , readQ "33.3e2" == 3330
+  , readQ "3.33e2" == 333
+  , round (1/2 :: Quotient) == 0
+  , round (3/2 :: Quotient) == 2
+  ]
diff --git a/test/scientific.hs b/test/scientific.hs
new file mode 100644
--- /dev/null
+++ b/test/scientific.hs
@@ -0,0 +1,56 @@
+-- Copyright (c) 2018 Rudy Matela.
+-- Distributed under the 3-Clause BSD licence (see the file LICENSE).
+import Test
+
+import Text.PercentFormat
+import Data.List (isInfixOf)
+
+import qualified Data.Ratio as R
+
+main :: IO ()
+main = reportTests tests
+
+tests :: [Bool]
+tests =
+  [ True
+
+{-
+  -- TODO: make the following pass:
+  , "%e" -% 0 == "0.0e0"
+  , "%e" -% 1 == "1.0e0"
+  , "%e" -% 2 == "2.0e0"
+  , "%e" -% 0.1   == "1.0e-1"
+  , "%e" -% 0.12  == "1.2e-1"
+  , "%e" -% 0.123 == "1.23e-1"
+  , "%e" -% 1.0   == "1.0e0"
+  , "%e" -% 1.2   == "1.2e0"
+  , "%e" -% 1.23  == "1.23e0"
+  , "%e" -% 10.0  == "1.0e1"
+  , "%e" -% 12.0  == "1.2e1"
+  , "%e" -% 12.3  == "1.23e1"
+  , "%.1e" -% 0     == "0.0e0"
+  , "%.1e" -% 1     == "1.0e0"
+  , "%.1e" -% 2     == "2.0e0"
+  , "%.1e" -% 0.1   == "1.0e-1"
+  , "%.1e" -% 0.12  == "1.2e-1"
+  , "%.1e" -% 0.123 == "1.2e-1"
+  , "%.1e" -% 1.0   == "1.0e0"
+  , "%.1e" -% 1.2   == "1.2e0"
+  , "%.1e" -% 1.23  == "1.2e0"
+  , "%.1e" -% 10.0  == "1.0e1"
+  , "%.1e" -% 12.0  == "1.2e1"
+  , "%.1e" -% 12.3  == "1.2e1"
+  , "%.2e" -% 0     == "0.00e0"
+  , "%.2e" -% 1     == "1.00e0"
+  , "%.2e" -% 2     == "2.00e0"
+  , "%.2e" -% 0.1   == "1.00e-1"
+  , "%.2e" -% 0.12  == "1.20e-1"
+  , "%.2e" -% 0.123 == "1.23e-1"
+  , "%.2e" -% 1.0   == "1.00e0"
+  , "%.2e" -% 1.2   == "1.20e0"
+  , "%.2e" -% 1.23  == "1.23e0"
+  , "%.2e" -% 10.0  == "1.00e1"
+  , "%.2e" -% 12.0  == "1.20e1"
+  , "%.2e" -% 12.3  == "1.23e1"
+-}
+  ]
diff --git a/test/sdist b/test/sdist
new file mode 100644
--- /dev/null
+++ b/test/sdist
@@ -0,0 +1,40 @@
+#!/bin/bash
+#
+# test/sdist: tests the package generated by "cabal sdist".
+#
+# Copyright (c) 2015-2021 Rudy Matela.
+# Distributed under the 3-Clause BSD licence.
+
+set -xe
+
+export LC_ALL=C  # consistent sort
+
+pkgver=` cat *.cabal | grep "^version:" | sed -e "s/version: *//"`
+pkgname=`cat *.cabal | grep "^name:"    | sed -e "s/name: *//"`
+pkgbase=$pkgname-$pkgver
+
+cabal sdist
+
+# Try to find the package generated by cabal.
+pkg=`find dist* -name $pkgbase.tar.gz`
+[ -f "$pkg" ]
+# If the script fails here, either:
+#   * no package was generated
+#   * there are packages in both dist and dist-newstyle folders.
+
+tmp=`mktemp -d /tmp/test-sdist-XXXXXXXXXX`
+
+# Test if our file is compatible with case-insensitive filesystems.
+tar -tf $pkg | sort --ignore-case          > $tmp/ls-cabal-i
+tar -tf $pkg | sort --ignore-case --unique > $tmp/ls-cabal-iu
+diff -rud $tmp/ls-cabal-i $tmp/ls-cabal-iu
+
+if [ -d .git ]
+then
+	# Test if files included by cabal are the same as files tracked in git.
+	git ls-files                                         | sort > $tmp/ls-git
+	tar -tf $pkg | grep -v "/$" | sed -e "s,$pkgbase/,," | sort > $tmp/ls-cabal
+	diff -rud $tmp/ls-git $tmp/ls-cabal
+fi
+
+rm -r $tmp
diff --git a/test/spec.hs b/test/spec.hs
new file mode 100644
--- /dev/null
+++ b/test/spec.hs
@@ -0,0 +1,48 @@
+-- Copyright (c) 2018 Rudy Matela.
+-- Distributed under the 3-Clause BSD licence (see the file LICENSE).
+import Test
+
+import Text.PercentFormat.Spec
+
+main :: IO ()
+main = reportTests tests
+
+tests :: [Bool]
+tests =
+  [ True
+  , parseSpec "%"    ==- spec {ty = Percent}
+  , parseSpec "r"    ==- spec {ty = ReprSpec}
+  , parseSpec "s"    ==- spec {ty = StringSpec}
+  , parseSpec "10s"  ==- spec {ty = StringSpec,  width = 10}
+  , parseSpec "21s"  ==- spec {ty = StringSpec,  width = 21}
+  , parseSpec "d"    ==- spec {ty = NumberSpec}
+  , parseSpec "4d"   ==- spec {ty = NumberSpec, width =  4,  base = 10}
+  , parseSpec "6d"   ==- spec {ty = NumberSpec, width =  6,  base = 10}
+  , parseSpec "07d"  ==- spec {ty = NumberSpec, width =  7,  padWith = '0'}
+  , parseSpec "073d" ==- spec {ty = NumberSpec, width =  73, padWith = '0'}
+  , parseSpec "6i"   ==- spec {ty = NumberSpec, width =  6,  base = 10, precision = Just 0}
+  , parseSpec "07i"  ==- spec {ty = NumberSpec, width =  7,  padWith = '0', precision = Just 0}
+  , parseSpec "07.*i" ==- spec {ty = NumberSpec, width =  7,  padWith = '0'}
+  , parseSpec "073i" ==- spec {ty = NumberSpec, width =  73, padWith = '0', precision = Just 0}
+  , parseSpec "x"    ==- spec {ty = NumberSpec, base = 16}
+  , parseSpec "X"    ==- spec {ty = NumberSpec, base = 16, capitalizeDigits = True}
+  , parseSpec "o"    ==- spec {ty = NumberSpec, base =  8}
+  , parseSpec "b"    ==- spec {ty = NumberSpec, base =  2}
+  , parseSpec "d"    ==- spec {ty = NumberSpec, positivePrefix=""}
+  , parseSpec "+d"   ==- spec {ty = NumberSpec, positivePrefix="+"}
+  , parseSpec " d"   ==- spec {ty = NumberSpec, positivePrefix=" "}
+  , parseSpec "i"    ==- spec {ty = NumberSpec, positivePrefix="", precision = Just 0}
+  , parseSpec "+i"   ==- spec {ty = NumberSpec, positivePrefix="+", precision = Just 0}
+  , parseSpec " i"   ==- spec {ty = NumberSpec, positivePrefix=" ", precision = Just 0}
+  , parseSpec ".*i"  ==- spec {ty = NumberSpec, positivePrefix=""}
+  , parseSpec "f"    ==- spec {ty = NumberSpec, minPrecision = 1}
+  , parseSpec "3f"   ==- spec {ty = NumberSpec, minPrecision = 1, width = 3}
+  , parseSpec "4.1f" ==- spec {ty = NumberSpec, minPrecision = 1, width = 4, precision = Just 1}
+  , parseSpec "4.0f" ==- spec {ty = NumberSpec, minPrecision = 1, width = 4, precision = Just 0}
+  , parseSpec "4.f"  ==- spec {ty = NumberSpec, minPrecision = 1, width = 4, precision = Just 0}
+  , parseSpec "f"    ==- spec {ty = NumberSpec, minPrecision = 1, positivePrefix=""}
+  , parseSpec "+f"   ==- spec {ty = NumberSpec, minPrecision = 1, positivePrefix="+"}
+  , parseSpec " f"   ==- spec {ty = NumberSpec, minPrecision = 1, positivePrefix=" "}
+    ]
+  where
+  x ==- y = x == (y,"")
diff --git a/test/unit.hs b/test/unit.hs
new file mode 100644
--- /dev/null
+++ b/test/unit.hs
@@ -0,0 +1,49 @@
+-- Copyright (c) 2018 Rudy Matela.
+-- Distributed under the 3-Clause BSD licence (see the file LICENSE).
+import Test
+
+import Text.PercentFormat
+
+main :: IO ()
+main = reportTests tests
+
+tests :: [Bool]
+tests =
+  [ True
+
+  , "asdf qwer"      % "asdf" ==  "asdf qwer"
+  , "zxcv qwer"      % "asdf" ==  "zxcv qwer"
+  , "asdf %s qwer"   % "asdf" ==  "asdf asdf qwer"
+  , "asdf %5s qwer"  % "asdf" ==  "asdf  asdf qwer"
+  , "asdf %5-s qwer" % "asdf" ==  "asdf asdf  qwer"
+  , "%s" % "1%" == "1%%"
+  , "%s" -% "1%" == "1%"
+
+  , "asdf %d qwer"   % 10     ==  "asdf 10 qwer"
+  , "asdf %2d qwer"  %  9     ==  "asdf  9 qwer"
+  , "asdf %02d qwer" %  9     ==  "asdf 09 qwer"
+  , "asdf %012d qwer" % 123   ==  "asdf 000000000123 qwer"
+
+  , "asdf %x qwer" % 10       ==  "asdf a qwer"
+  , "asdf %04x qwer" % 10     ==  "asdf 000a qwer"
+  , "asdf %o qwer"   % 10     ==  "asdf 12 qwer"
+  , "asdf %03o qwer" % 10     ==  "asdf 012 qwer"
+  , "%b" % 10 == "1010"
+  , "%08b" % 10 == "00001010"
+  , "asdf %X qwer" % 10       ==  "asdf A qwer"
+
+  , "%c" % 'c' == "c"
+  , "%r" % 'c' == "'c'"
+
+  , "%s" % 10 == "10"
+
+  , "%c"   % "a" == "!"
+  , "%c"   % 3   == "!"
+  , "%c"   % 3.1 == "!"
+
+  -- not really error:
+  , "%s"   % 0    == "0"
+  , "%s"   % 3.14 == "3.14"
+  , "%2s"  % 0    == " 0"
+  , "%2s"  % 3.14 == "3.14"
+  ]
diff --git a/tests/Test.hs b/tests/Test.hs
deleted file mode 100644
--- a/tests/Test.hs
+++ /dev/null
@@ -1,21 +0,0 @@
--- |
--- Module      : Test
--- Copyright   : (c) 2018 Rudy Matela
--- License     : 3-Clause BSD  (see the file LICENSE)
--- Maintainer  : Rudy Matela <rudy@matela.com.br>
---
--- This module is part of PercentFormat.
---
--- Some helper functios to test PercentFormat itself.
-module Test where
-
-import System.Environment (getArgs)
-import System.Exit (exitFailure)
-import Data.List (elemIndices)
-
-reportTests :: [Bool] -> IO ()
-reportTests tests =
-  case elemIndices False tests of
-    [] -> putStrLn "+++ Tests passed!"
-    is -> do putStrLn ("*** Failed tests:" ++ show is)
-             exitFailure
diff --git a/tests/diff/examples-+3i.out b/tests/diff/examples-+3i.out
deleted file mode 100644
--- a/tests/diff/examples-+3i.out
+++ /dev/null
@@ -1,63 +0,0 @@
-"%+3i" -% ""           == "!!!"
-"%+3i" -% "a"          == "!!!"
-"%+3i" -% "aa"         == "!!!"
-"%+3i" -% " "          == "!!!"
-"%+3i" -% "aaa"        == "!!!"
-"%+3i" -% "a "         == "!!!"
-"%+3i" -% " a"         == "!!!"
-"%+3i" -% "b"          == "!!!"
-"%+3i" -% "aaaa"       == "!!!"
-"%+3i" -% "aa "        == "!!!"
-"%+3i" -% "a a"        == "!!!"
-"%+3i" -% "ab"         == "!!!"
-"%+3i" -% 0            == " +0"
-"%+3i" -% 1            == " +1"
-"%+3i" -% (-1)         == " -1"
-"%+3i" -% 2            == " +2"
-"%+3i" -% (-2)         == " -2"
-"%+3i" -% 3            == " +3"
-"%+3i" -% (-3)         == " -3"
-"%+3i" -% 4            == " +4"
-"%+3i" -% (-4)         == " -4"
-"%+3i" -% 5            == " +5"
-"%+3i" -% (-5)         == " -5"
-"%+3i" -% 6            == " +6"
-"%+3i" -% 0.0          == " +0"
-"%+3i" -% 1.0          == " +1"
-"%+3i" -% 0.5          == " +0"
-"%+3i" -% (-1.0)       == " -1"
-"%+3i" -% 1.5          == " +2"
-"%+3i" -% 0.25         == " +0"
-"%+3i" -% Infinity     == "+Infinity"
-"%+3i" -% 2.0          == " +2"
-"%+3i" -% (-0.5)       == " -0"
-"%+3i" -% 1.25         == " +1"
-"%+3i" -% 0.75         == " +1"
-"%+3i" -% (-Infinity)  == "-Infinity"
-"%+3i" -% (0 % 1)      == " +0"
-"%+3i" -% (1 % 1)      == " +1"
-"%+3i" -% ((-1) % 1)   == " -1"
-"%+3i" -% (1 % 2)      == " +0"
-"%+3i" -% (2 % 1)      == " +2"
-"%+3i" -% ((-1) % 2)   == " -0"
-"%+3i" -% ((-2) % 1)   == " -2"
-"%+3i" -% (1 % 3)      == " +0"
-"%+3i" -% (3 % 1)      == " +3"
-"%+3i" -% ((-1) % 3)   == " -0"
-"%+3i" -% ((-3) % 1)   == " -3"
-"%+3i" -% (1 % 4)      == " +0"
-"%+3i" -% 'a'          == "!!!"
-"%+3i" -% ' '          == "!!!"
-"%+3i" -% 'b'          == "!!!"
-"%+3i" -% 'A'          == "!!!"
-"%+3i" -% 'c'          == "!!!"
-"%+3i" -% '\n'         == "!!!"
-"%+3i" -% 'd'          == "!!!"
-"%+3i" -% '0'          == "!!!"
-"%+3i" -% 'e'          == "!!!"
-"%+3i" -% 'B'          == "!!!"
-"%+3i" -% 'f'          == "!!!"
-"%+3i" -% '!'          == "!!!"
-"%+3i" -% False        == "!!!"
-"%+3i" -% True         == "!!!"
-
diff --git a/tests/diff/examples-+5f.out b/tests/diff/examples-+5f.out
deleted file mode 100644
--- a/tests/diff/examples-+5f.out
+++ /dev/null
@@ -1,63 +0,0 @@
-"%+5f" -% ""           == "!!!!!"
-"%+5f" -% "a"          == "!!!!!"
-"%+5f" -% "aa"         == "!!!!!"
-"%+5f" -% " "          == "!!!!!"
-"%+5f" -% "aaa"        == "!!!!!"
-"%+5f" -% "a "         == "!!!!!"
-"%+5f" -% " a"         == "!!!!!"
-"%+5f" -% "b"          == "!!!!!"
-"%+5f" -% "aaaa"       == "!!!!!"
-"%+5f" -% "aa "        == "!!!!!"
-"%+5f" -% "a a"        == "!!!!!"
-"%+5f" -% "ab"         == "!!!!!"
-"%+5f" -% 0            == " +0.0"
-"%+5f" -% 1            == " +1.0"
-"%+5f" -% (-1)         == " -1.0"
-"%+5f" -% 2            == " +2.0"
-"%+5f" -% (-2)         == " -2.0"
-"%+5f" -% 3            == " +3.0"
-"%+5f" -% (-3)         == " -3.0"
-"%+5f" -% 4            == " +4.0"
-"%+5f" -% (-4)         == " -4.0"
-"%+5f" -% 5            == " +5.0"
-"%+5f" -% (-5)         == " -5.0"
-"%+5f" -% 6            == " +6.0"
-"%+5f" -% 0.0          == " +0.0"
-"%+5f" -% 1.0          == " +1.0"
-"%+5f" -% 0.5          == " +0.5"
-"%+5f" -% (-1.0)       == " -1.0"
-"%+5f" -% 1.5          == " +1.5"
-"%+5f" -% 0.25         == "+0.25"
-"%+5f" -% Infinity     == "+Infinity"
-"%+5f" -% 2.0          == " +2.0"
-"%+5f" -% (-0.5)       == " -0.5"
-"%+5f" -% 1.25         == "+1.25"
-"%+5f" -% 0.75         == "+0.75"
-"%+5f" -% (-Infinity)  == "-Infinity"
-"%+5f" -% (0 % 1)      == " +0.0"
-"%+5f" -% (1 % 1)      == " +1.0"
-"%+5f" -% ((-1) % 1)   == " -1.0"
-"%+5f" -% (1 % 2)      == " +0.5"
-"%+5f" -% (2 % 1)      == " +2.0"
-"%+5f" -% ((-1) % 2)   == " -0.5"
-"%+5f" -% ((-2) % 1)   == " -2.0"
-"%+5f" -% (1 % 3)      == "   +0"
-"%+5f" -% (3 % 1)      == " +3.0"
-"%+5f" -% ((-1) % 3)   == "   -0"
-"%+5f" -% ((-3) % 1)   == " -3.0"
-"%+5f" -% (1 % 4)      == "+0.25"
-"%+5f" -% 'a'          == "!!!!!"
-"%+5f" -% ' '          == "!!!!!"
-"%+5f" -% 'b'          == "!!!!!"
-"%+5f" -% 'A'          == "!!!!!"
-"%+5f" -% 'c'          == "!!!!!"
-"%+5f" -% '\n'         == "!!!!!"
-"%+5f" -% 'd'          == "!!!!!"
-"%+5f" -% '0'          == "!!!!!"
-"%+5f" -% 'e'          == "!!!!!"
-"%+5f" -% 'B'          == "!!!!!"
-"%+5f" -% 'f'          == "!!!!!"
-"%+5f" -% '!'          == "!!!!!"
-"%+5f" -% False        == "!!!!!"
-"%+5f" -% True         == "!!!!!"
-
diff --git a/tests/diff/examples--11p2f.out b/tests/diff/examples--11p2f.out
deleted file mode 100644
--- a/tests/diff/examples--11p2f.out
+++ /dev/null
@@ -1,63 +0,0 @@
-"%-11.2f" -% ""           == "!!!!!!!!!!!"
-"%-11.2f" -% "a"          == "!!!!!!!!!!!"
-"%-11.2f" -% "aa"         == "!!!!!!!!!!!"
-"%-11.2f" -% " "          == "!!!!!!!!!!!"
-"%-11.2f" -% "aaa"        == "!!!!!!!!!!!"
-"%-11.2f" -% "a "         == "!!!!!!!!!!!"
-"%-11.2f" -% " a"         == "!!!!!!!!!!!"
-"%-11.2f" -% "b"          == "!!!!!!!!!!!"
-"%-11.2f" -% "aaaa"       == "!!!!!!!!!!!"
-"%-11.2f" -% "aa "        == "!!!!!!!!!!!"
-"%-11.2f" -% "a a"        == "!!!!!!!!!!!"
-"%-11.2f" -% "ab"         == "!!!!!!!!!!!"
-"%-11.2f" -% 0            == "0.00       "
-"%-11.2f" -% 1            == "1.00       "
-"%-11.2f" -% (-1)         == "-1.00      "
-"%-11.2f" -% 2            == "2.00       "
-"%-11.2f" -% (-2)         == "-2.00      "
-"%-11.2f" -% 3            == "3.00       "
-"%-11.2f" -% (-3)         == "-3.00      "
-"%-11.2f" -% 4            == "4.00       "
-"%-11.2f" -% (-4)         == "-4.00      "
-"%-11.2f" -% 5            == "5.00       "
-"%-11.2f" -% (-5)         == "-5.00      "
-"%-11.2f" -% 6            == "6.00       "
-"%-11.2f" -% 0.0          == "0.00       "
-"%-11.2f" -% 1.0          == "1.00       "
-"%-11.2f" -% 0.5          == "0.50       "
-"%-11.2f" -% (-1.0)       == "-1.00      "
-"%-11.2f" -% 1.5          == "1.50       "
-"%-11.2f" -% 0.25         == "0.25       "
-"%-11.2f" -% Infinity     == "Infinity   "
-"%-11.2f" -% 2.0          == "2.00       "
-"%-11.2f" -% (-0.5)       == "-0.50      "
-"%-11.2f" -% 1.25         == "1.25       "
-"%-11.2f" -% 0.75         == "0.75       "
-"%-11.2f" -% (-Infinity)  == "-Infinity  "
-"%-11.2f" -% (0 % 1)      == "0.00       "
-"%-11.2f" -% (1 % 1)      == "1.00       "
-"%-11.2f" -% ((-1) % 1)   == "-1.00      "
-"%-11.2f" -% (1 % 2)      == "0.50       "
-"%-11.2f" -% (2 % 1)      == "2.00       "
-"%-11.2f" -% ((-1) % 2)   == "-0.50      "
-"%-11.2f" -% ((-2) % 1)   == "-2.00      "
-"%-11.2f" -% (1 % 3)      == "0.33       "
-"%-11.2f" -% (3 % 1)      == "3.00       "
-"%-11.2f" -% ((-1) % 3)   == "-0.33      "
-"%-11.2f" -% ((-3) % 1)   == "-3.00      "
-"%-11.2f" -% (1 % 4)      == "0.25       "
-"%-11.2f" -% 'a'          == "!!!!!!!!!!!"
-"%-11.2f" -% ' '          == "!!!!!!!!!!!"
-"%-11.2f" -% 'b'          == "!!!!!!!!!!!"
-"%-11.2f" -% 'A'          == "!!!!!!!!!!!"
-"%-11.2f" -% 'c'          == "!!!!!!!!!!!"
-"%-11.2f" -% '\n'         == "!!!!!!!!!!!"
-"%-11.2f" -% 'd'          == "!!!!!!!!!!!"
-"%-11.2f" -% '0'          == "!!!!!!!!!!!"
-"%-11.2f" -% 'e'          == "!!!!!!!!!!!"
-"%-11.2f" -% 'B'          == "!!!!!!!!!!!"
-"%-11.2f" -% 'f'          == "!!!!!!!!!!!"
-"%-11.2f" -% '!'          == "!!!!!!!!!!!"
-"%-11.2f" -% False        == "!!!!!!!!!!!"
-"%-11.2f" -% True         == "!!!!!!!!!!!"
-
diff --git a/tests/diff/examples--3i.out b/tests/diff/examples--3i.out
deleted file mode 100644
--- a/tests/diff/examples--3i.out
+++ /dev/null
@@ -1,63 +0,0 @@
-"%-3i" -% ""           == "!!!"
-"%-3i" -% "a"          == "!!!"
-"%-3i" -% "aa"         == "!!!"
-"%-3i" -% " "          == "!!!"
-"%-3i" -% "aaa"        == "!!!"
-"%-3i" -% "a "         == "!!!"
-"%-3i" -% " a"         == "!!!"
-"%-3i" -% "b"          == "!!!"
-"%-3i" -% "aaaa"       == "!!!"
-"%-3i" -% "aa "        == "!!!"
-"%-3i" -% "a a"        == "!!!"
-"%-3i" -% "ab"         == "!!!"
-"%-3i" -% 0            == "0  "
-"%-3i" -% 1            == "1  "
-"%-3i" -% (-1)         == "-1 "
-"%-3i" -% 2            == "2  "
-"%-3i" -% (-2)         == "-2 "
-"%-3i" -% 3            == "3  "
-"%-3i" -% (-3)         == "-3 "
-"%-3i" -% 4            == "4  "
-"%-3i" -% (-4)         == "-4 "
-"%-3i" -% 5            == "5  "
-"%-3i" -% (-5)         == "-5 "
-"%-3i" -% 6            == "6  "
-"%-3i" -% 0.0          == "0  "
-"%-3i" -% 1.0          == "1  "
-"%-3i" -% 0.5          == "0  "
-"%-3i" -% (-1.0)       == "-1 "
-"%-3i" -% 1.5          == "2  "
-"%-3i" -% 0.25         == "0  "
-"%-3i" -% Infinity     == "Infinity"
-"%-3i" -% 2.0          == "2  "
-"%-3i" -% (-0.5)       == "-0 "
-"%-3i" -% 1.25         == "1  "
-"%-3i" -% 0.75         == "1  "
-"%-3i" -% (-Infinity)  == "-Infinity"
-"%-3i" -% (0 % 1)      == "0  "
-"%-3i" -% (1 % 1)      == "1  "
-"%-3i" -% ((-1) % 1)   == "-1 "
-"%-3i" -% (1 % 2)      == "0  "
-"%-3i" -% (2 % 1)      == "2  "
-"%-3i" -% ((-1) % 2)   == "-0 "
-"%-3i" -% ((-2) % 1)   == "-2 "
-"%-3i" -% (1 % 3)      == "0  "
-"%-3i" -% (3 % 1)      == "3  "
-"%-3i" -% ((-1) % 3)   == "-0 "
-"%-3i" -% ((-3) % 1)   == "-3 "
-"%-3i" -% (1 % 4)      == "0  "
-"%-3i" -% 'a'          == "!!!"
-"%-3i" -% ' '          == "!!!"
-"%-3i" -% 'b'          == "!!!"
-"%-3i" -% 'A'          == "!!!"
-"%-3i" -% 'c'          == "!!!"
-"%-3i" -% '\n'         == "!!!"
-"%-3i" -% 'd'          == "!!!"
-"%-3i" -% '0'          == "!!!"
-"%-3i" -% 'e'          == "!!!"
-"%-3i" -% 'B'          == "!!!"
-"%-3i" -% 'f'          == "!!!"
-"%-3i" -% '!'          == "!!!"
-"%-3i" -% False        == "!!!"
-"%-3i" -% True         == "!!!"
-
diff --git a/tests/diff/examples--5f.out b/tests/diff/examples--5f.out
deleted file mode 100644
--- a/tests/diff/examples--5f.out
+++ /dev/null
@@ -1,63 +0,0 @@
-"%-5f" -% ""           == "!!!!!"
-"%-5f" -% "a"          == "!!!!!"
-"%-5f" -% "aa"         == "!!!!!"
-"%-5f" -% " "          == "!!!!!"
-"%-5f" -% "aaa"        == "!!!!!"
-"%-5f" -% "a "         == "!!!!!"
-"%-5f" -% " a"         == "!!!!!"
-"%-5f" -% "b"          == "!!!!!"
-"%-5f" -% "aaaa"       == "!!!!!"
-"%-5f" -% "aa "        == "!!!!!"
-"%-5f" -% "a a"        == "!!!!!"
-"%-5f" -% "ab"         == "!!!!!"
-"%-5f" -% 0            == "0.0  "
-"%-5f" -% 1            == "1.0  "
-"%-5f" -% (-1)         == "-1.0 "
-"%-5f" -% 2            == "2.0  "
-"%-5f" -% (-2)         == "-2.0 "
-"%-5f" -% 3            == "3.0  "
-"%-5f" -% (-3)         == "-3.0 "
-"%-5f" -% 4            == "4.0  "
-"%-5f" -% (-4)         == "-4.0 "
-"%-5f" -% 5            == "5.0  "
-"%-5f" -% (-5)         == "-5.0 "
-"%-5f" -% 6            == "6.0  "
-"%-5f" -% 0.0          == "0.0  "
-"%-5f" -% 1.0          == "1.0  "
-"%-5f" -% 0.5          == "0.5  "
-"%-5f" -% (-1.0)       == "-1.0 "
-"%-5f" -% 1.5          == "1.5  "
-"%-5f" -% 0.25         == "0.25 "
-"%-5f" -% Infinity     == "Infinity"
-"%-5f" -% 2.0          == "2.0  "
-"%-5f" -% (-0.5)       == "-0.5 "
-"%-5f" -% 1.25         == "1.25 "
-"%-5f" -% 0.75         == "0.75 "
-"%-5f" -% (-Infinity)  == "-Infinity"
-"%-5f" -% (0 % 1)      == "0.0  "
-"%-5f" -% (1 % 1)      == "1.0  "
-"%-5f" -% ((-1) % 1)   == "-1.0 "
-"%-5f" -% (1 % 2)      == "0.5  "
-"%-5f" -% (2 % 1)      == "2.0  "
-"%-5f" -% ((-1) % 2)   == "-0.5 "
-"%-5f" -% ((-2) % 1)   == "-2.0 "
-"%-5f" -% (1 % 3)      == "0    "
-"%-5f" -% (3 % 1)      == "3.0  "
-"%-5f" -% ((-1) % 3)   == "-0   "
-"%-5f" -% ((-3) % 1)   == "-3.0 "
-"%-5f" -% (1 % 4)      == "0.25 "
-"%-5f" -% 'a'          == "!!!!!"
-"%-5f" -% ' '          == "!!!!!"
-"%-5f" -% 'b'          == "!!!!!"
-"%-5f" -% 'A'          == "!!!!!"
-"%-5f" -% 'c'          == "!!!!!"
-"%-5f" -% '\n'         == "!!!!!"
-"%-5f" -% 'd'          == "!!!!!"
-"%-5f" -% '0'          == "!!!!!"
-"%-5f" -% 'e'          == "!!!!!"
-"%-5f" -% 'B'          == "!!!!!"
-"%-5f" -% 'f'          == "!!!!!"
-"%-5f" -% '!'          == "!!!!!"
-"%-5f" -% False        == "!!!!!"
-"%-5f" -% True         == "!!!!!"
-
diff --git a/tests/diff/examples--6r.out b/tests/diff/examples--6r.out
deleted file mode 100644
--- a/tests/diff/examples--6r.out
+++ /dev/null
@@ -1,63 +0,0 @@
-"%-6r" -% ""           == "\"\"    "
-"%-6r" -% "a"          == "\"a\"   "
-"%-6r" -% "aa"         == "\"aa\"  "
-"%-6r" -% " "          == "\" \"   "
-"%-6r" -% "aaa"        == "\"aaa\" "
-"%-6r" -% "a "         == "\"a \"  "
-"%-6r" -% " a"         == "\" a\"  "
-"%-6r" -% "b"          == "\"b\"   "
-"%-6r" -% "aaaa"       == "\"aaaa\""
-"%-6r" -% "aa "        == "\"aa \" "
-"%-6r" -% "a a"        == "\"a a\" "
-"%-6r" -% "ab"         == "\"ab\"  "
-"%-6r" -% 0            == "0     "
-"%-6r" -% 1            == "1     "
-"%-6r" -% (-1)         == "-1    "
-"%-6r" -% 2            == "2     "
-"%-6r" -% (-2)         == "-2    "
-"%-6r" -% 3            == "3     "
-"%-6r" -% (-3)         == "-3    "
-"%-6r" -% 4            == "4     "
-"%-6r" -% (-4)         == "-4    "
-"%-6r" -% 5            == "5     "
-"%-6r" -% (-5)         == "-5    "
-"%-6r" -% 6            == "6     "
-"%-6r" -% 0.0          == "0.0   "
-"%-6r" -% 1.0          == "1.0   "
-"%-6r" -% 0.5          == "0.5   "
-"%-6r" -% (-1.0)       == "-1.0  "
-"%-6r" -% 1.5          == "1.5   "
-"%-6r" -% 0.25         == "0.25  "
-"%-6r" -% Infinity     == "Infinity"
-"%-6r" -% 2.0          == "2.0   "
-"%-6r" -% (-0.5)       == "-0.5  "
-"%-6r" -% 1.25         == "1.25  "
-"%-6r" -% 0.75         == "0.75  "
-"%-6r" -% (-Infinity)  == "-Infinity"
-"%-6r" -% (0 % 1)      == "0 % 1 "
-"%-6r" -% (1 % 1)      == "1 % 1 "
-"%-6r" -% ((-1) % 1)   == "(-1) % 1"
-"%-6r" -% (1 % 2)      == "1 % 2 "
-"%-6r" -% (2 % 1)      == "2 % 1 "
-"%-6r" -% ((-1) % 2)   == "(-1) % 2"
-"%-6r" -% ((-2) % 1)   == "(-2) % 1"
-"%-6r" -% (1 % 3)      == "1 % 3 "
-"%-6r" -% (3 % 1)      == "3 % 1 "
-"%-6r" -% ((-1) % 3)   == "(-1) % 3"
-"%-6r" -% ((-3) % 1)   == "(-3) % 1"
-"%-6r" -% (1 % 4)      == "1 % 4 "
-"%-6r" -% 'a'          == "'a'   "
-"%-6r" -% ' '          == "' '   "
-"%-6r" -% 'b'          == "'b'   "
-"%-6r" -% 'A'          == "'A'   "
-"%-6r" -% 'c'          == "'c'   "
-"%-6r" -% '\n'         == "'\\n'  "
-"%-6r" -% 'd'          == "'d'   "
-"%-6r" -% '0'          == "'0'   "
-"%-6r" -% 'e'          == "'e'   "
-"%-6r" -% 'B'          == "'B'   "
-"%-6r" -% 'f'          == "'f'   "
-"%-6r" -% '!'          == "'!'   "
-"%-6r" -% False        == "False "
-"%-6r" -% True         == "True  "
-
diff --git a/tests/diff/examples--6s.out b/tests/diff/examples--6s.out
deleted file mode 100644
--- a/tests/diff/examples--6s.out
+++ /dev/null
@@ -1,63 +0,0 @@
-"%-6s" -% ""           == "      "
-"%-6s" -% "a"          == "a     "
-"%-6s" -% "aa"         == "aa    "
-"%-6s" -% " "          == "      "
-"%-6s" -% "aaa"        == "aaa   "
-"%-6s" -% "a "         == "a     "
-"%-6s" -% " a"         == " a    "
-"%-6s" -% "b"          == "b     "
-"%-6s" -% "aaaa"       == "aaaa  "
-"%-6s" -% "aa "        == "aa    "
-"%-6s" -% "a a"        == "a a   "
-"%-6s" -% "ab"         == "ab    "
-"%-6s" -% 0            == "0     "
-"%-6s" -% 1            == "1     "
-"%-6s" -% (-1)         == "-1    "
-"%-6s" -% 2            == "2     "
-"%-6s" -% (-2)         == "-2    "
-"%-6s" -% 3            == "3     "
-"%-6s" -% (-3)         == "-3    "
-"%-6s" -% 4            == "4     "
-"%-6s" -% (-4)         == "-4    "
-"%-6s" -% 5            == "5     "
-"%-6s" -% (-5)         == "-5    "
-"%-6s" -% 6            == "6     "
-"%-6s" -% 0.0          == "0.0   "
-"%-6s" -% 1.0          == "1.0   "
-"%-6s" -% 0.5          == "0.5   "
-"%-6s" -% (-1.0)       == "-1.0  "
-"%-6s" -% 1.5          == "1.5   "
-"%-6s" -% 0.25         == "0.25  "
-"%-6s" -% Infinity     == "Infinity"
-"%-6s" -% 2.0          == "2.0   "
-"%-6s" -% (-0.5)       == "-0.5  "
-"%-6s" -% 1.25         == "1.25  "
-"%-6s" -% 0.75         == "0.75  "
-"%-6s" -% (-Infinity)  == "-Infinity"
-"%-6s" -% (0 % 1)      == "0 % 1 "
-"%-6s" -% (1 % 1)      == "1 % 1 "
-"%-6s" -% ((-1) % 1)   == "(-1) % 1"
-"%-6s" -% (1 % 2)      == "1 % 2 "
-"%-6s" -% (2 % 1)      == "2 % 1 "
-"%-6s" -% ((-1) % 2)   == "(-1) % 2"
-"%-6s" -% ((-2) % 1)   == "(-2) % 1"
-"%-6s" -% (1 % 3)      == "1 % 3 "
-"%-6s" -% (3 % 1)      == "3 % 1 "
-"%-6s" -% ((-1) % 3)   == "(-1) % 3"
-"%-6s" -% ((-3) % 1)   == "(-3) % 1"
-"%-6s" -% (1 % 4)      == "1 % 4 "
-"%-6s" -% 'a'          == "'a'   "
-"%-6s" -% ' '          == "' '   "
-"%-6s" -% 'b'          == "'b'   "
-"%-6s" -% 'A'          == "'A'   "
-"%-6s" -% 'c'          == "'c'   "
-"%-6s" -% '\n'         == "'\\n'  "
-"%-6s" -% 'd'          == "'d'   "
-"%-6s" -% '0'          == "'0'   "
-"%-6s" -% 'e'          == "'e'   "
-"%-6s" -% 'B'          == "'B'   "
-"%-6s" -% 'f'          == "'f'   "
-"%-6s" -% '!'          == "'!'   "
-"%-6s" -% False        == "False "
-"%-6s" -% True         == "True  "
-
diff --git a/tests/diff/examples-03i.out b/tests/diff/examples-03i.out
deleted file mode 100644
--- a/tests/diff/examples-03i.out
+++ /dev/null
@@ -1,63 +0,0 @@
-"%03i" -% ""           == "!!!"
-"%03i" -% "a"          == "!!!"
-"%03i" -% "aa"         == "!!!"
-"%03i" -% " "          == "!!!"
-"%03i" -% "aaa"        == "!!!"
-"%03i" -% "a "         == "!!!"
-"%03i" -% " a"         == "!!!"
-"%03i" -% "b"          == "!!!"
-"%03i" -% "aaaa"       == "!!!"
-"%03i" -% "aa "        == "!!!"
-"%03i" -% "a a"        == "!!!"
-"%03i" -% "ab"         == "!!!"
-"%03i" -% 0            == "000"
-"%03i" -% 1            == "001"
-"%03i" -% (-1)         == "-01"
-"%03i" -% 2            == "002"
-"%03i" -% (-2)         == "-02"
-"%03i" -% 3            == "003"
-"%03i" -% (-3)         == "-03"
-"%03i" -% 4            == "004"
-"%03i" -% (-4)         == "-04"
-"%03i" -% 5            == "005"
-"%03i" -% (-5)         == "-05"
-"%03i" -% 6            == "006"
-"%03i" -% 0.0          == "000"
-"%03i" -% 1.0          == "001"
-"%03i" -% 0.5          == "000"
-"%03i" -% (-1.0)       == "-01"
-"%03i" -% 1.5          == "002"
-"%03i" -% 0.25         == "000"
-"%03i" -% Infinity     == "Infinity"
-"%03i" -% 2.0          == "002"
-"%03i" -% (-0.5)       == "-00"
-"%03i" -% 1.25         == "001"
-"%03i" -% 0.75         == "001"
-"%03i" -% (-Infinity)  == "-Infinity"
-"%03i" -% (0 % 1)      == "000"
-"%03i" -% (1 % 1)      == "001"
-"%03i" -% ((-1) % 1)   == "-01"
-"%03i" -% (1 % 2)      == "000"
-"%03i" -% (2 % 1)      == "002"
-"%03i" -% ((-1) % 2)   == "-00"
-"%03i" -% ((-2) % 1)   == "-02"
-"%03i" -% (1 % 3)      == "000"
-"%03i" -% (3 % 1)      == "003"
-"%03i" -% ((-1) % 3)   == "-00"
-"%03i" -% ((-3) % 1)   == "-03"
-"%03i" -% (1 % 4)      == "000"
-"%03i" -% 'a'          == "!!!"
-"%03i" -% ' '          == "!!!"
-"%03i" -% 'b'          == "!!!"
-"%03i" -% 'A'          == "!!!"
-"%03i" -% 'c'          == "!!!"
-"%03i" -% '\n'         == "!!!"
-"%03i" -% 'd'          == "!!!"
-"%03i" -% '0'          == "!!!"
-"%03i" -% 'e'          == "!!!"
-"%03i" -% 'B'          == "!!!"
-"%03i" -% 'f'          == "!!!"
-"%03i" -% '!'          == "!!!"
-"%03i" -% False        == "!!!"
-"%03i" -% True         == "!!!"
-
diff --git a/tests/diff/examples-11p2f.out b/tests/diff/examples-11p2f.out
deleted file mode 100644
--- a/tests/diff/examples-11p2f.out
+++ /dev/null
@@ -1,63 +0,0 @@
-"%11.2f" -% ""           == "!!!!!!!!!!!"
-"%11.2f" -% "a"          == "!!!!!!!!!!!"
-"%11.2f" -% "aa"         == "!!!!!!!!!!!"
-"%11.2f" -% " "          == "!!!!!!!!!!!"
-"%11.2f" -% "aaa"        == "!!!!!!!!!!!"
-"%11.2f" -% "a "         == "!!!!!!!!!!!"
-"%11.2f" -% " a"         == "!!!!!!!!!!!"
-"%11.2f" -% "b"          == "!!!!!!!!!!!"
-"%11.2f" -% "aaaa"       == "!!!!!!!!!!!"
-"%11.2f" -% "aa "        == "!!!!!!!!!!!"
-"%11.2f" -% "a a"        == "!!!!!!!!!!!"
-"%11.2f" -% "ab"         == "!!!!!!!!!!!"
-"%11.2f" -% 0            == "       0.00"
-"%11.2f" -% 1            == "       1.00"
-"%11.2f" -% (-1)         == "      -1.00"
-"%11.2f" -% 2            == "       2.00"
-"%11.2f" -% (-2)         == "      -2.00"
-"%11.2f" -% 3            == "       3.00"
-"%11.2f" -% (-3)         == "      -3.00"
-"%11.2f" -% 4            == "       4.00"
-"%11.2f" -% (-4)         == "      -4.00"
-"%11.2f" -% 5            == "       5.00"
-"%11.2f" -% (-5)         == "      -5.00"
-"%11.2f" -% 6            == "       6.00"
-"%11.2f" -% 0.0          == "       0.00"
-"%11.2f" -% 1.0          == "       1.00"
-"%11.2f" -% 0.5          == "       0.50"
-"%11.2f" -% (-1.0)       == "      -1.00"
-"%11.2f" -% 1.5          == "       1.50"
-"%11.2f" -% 0.25         == "       0.25"
-"%11.2f" -% Infinity     == "   Infinity"
-"%11.2f" -% 2.0          == "       2.00"
-"%11.2f" -% (-0.5)       == "      -0.50"
-"%11.2f" -% 1.25         == "       1.25"
-"%11.2f" -% 0.75         == "       0.75"
-"%11.2f" -% (-Infinity)  == "  -Infinity"
-"%11.2f" -% (0 % 1)      == "       0.00"
-"%11.2f" -% (1 % 1)      == "       1.00"
-"%11.2f" -% ((-1) % 1)   == "      -1.00"
-"%11.2f" -% (1 % 2)      == "       0.50"
-"%11.2f" -% (2 % 1)      == "       2.00"
-"%11.2f" -% ((-1) % 2)   == "      -0.50"
-"%11.2f" -% ((-2) % 1)   == "      -2.00"
-"%11.2f" -% (1 % 3)      == "       0.33"
-"%11.2f" -% (3 % 1)      == "       3.00"
-"%11.2f" -% ((-1) % 3)   == "      -0.33"
-"%11.2f" -% ((-3) % 1)   == "      -3.00"
-"%11.2f" -% (1 % 4)      == "       0.25"
-"%11.2f" -% 'a'          == "!!!!!!!!!!!"
-"%11.2f" -% ' '          == "!!!!!!!!!!!"
-"%11.2f" -% 'b'          == "!!!!!!!!!!!"
-"%11.2f" -% 'A'          == "!!!!!!!!!!!"
-"%11.2f" -% 'c'          == "!!!!!!!!!!!"
-"%11.2f" -% '\n'         == "!!!!!!!!!!!"
-"%11.2f" -% 'd'          == "!!!!!!!!!!!"
-"%11.2f" -% '0'          == "!!!!!!!!!!!"
-"%11.2f" -% 'e'          == "!!!!!!!!!!!"
-"%11.2f" -% 'B'          == "!!!!!!!!!!!"
-"%11.2f" -% 'f'          == "!!!!!!!!!!!"
-"%11.2f" -% '!'          == "!!!!!!!!!!!"
-"%11.2f" -% False        == "!!!!!!!!!!!"
-"%11.2f" -% True         == "!!!!!!!!!!!"
-
diff --git a/tests/diff/examples-2c.out b/tests/diff/examples-2c.out
deleted file mode 100644
--- a/tests/diff/examples-2c.out
+++ /dev/null
@@ -1,63 +0,0 @@
-"%2c" -% ""           == "!!"
-"%2c" -% "a"          == "!!"
-"%2c" -% "aa"         == "!!"
-"%2c" -% " "          == "!!"
-"%2c" -% "aaa"        == "!!"
-"%2c" -% "a "         == "!!"
-"%2c" -% " a"         == "!!"
-"%2c" -% "b"          == "!!"
-"%2c" -% "aaaa"       == "!!"
-"%2c" -% "aa "        == "!!"
-"%2c" -% "a a"        == "!!"
-"%2c" -% "ab"         == "!!"
-"%2c" -% 0            == "!!"
-"%2c" -% 1            == "!!"
-"%2c" -% (-1)         == "!!"
-"%2c" -% 2            == "!!"
-"%2c" -% (-2)         == "!!"
-"%2c" -% 3            == "!!"
-"%2c" -% (-3)         == "!!"
-"%2c" -% 4            == "!!"
-"%2c" -% (-4)         == "!!"
-"%2c" -% 5            == "!!"
-"%2c" -% (-5)         == "!!"
-"%2c" -% 6            == "!!"
-"%2c" -% 0.0          == "!!"
-"%2c" -% 1.0          == "!!"
-"%2c" -% 0.5          == "!!"
-"%2c" -% (-1.0)       == "!!"
-"%2c" -% 1.5          == "!!"
-"%2c" -% 0.25         == "!!"
-"%2c" -% Infinity     == "!!"
-"%2c" -% 2.0          == "!!"
-"%2c" -% (-0.5)       == "!!"
-"%2c" -% 1.25         == "!!"
-"%2c" -% 0.75         == "!!"
-"%2c" -% (-Infinity)  == "!!"
-"%2c" -% (0 % 1)      == "!!"
-"%2c" -% (1 % 1)      == "!!"
-"%2c" -% ((-1) % 1)   == "!!"
-"%2c" -% (1 % 2)      == "!!"
-"%2c" -% (2 % 1)      == "!!"
-"%2c" -% ((-1) % 2)   == "!!"
-"%2c" -% ((-2) % 1)   == "!!"
-"%2c" -% (1 % 3)      == "!!"
-"%2c" -% (3 % 1)      == "!!"
-"%2c" -% ((-1) % 3)   == "!!"
-"%2c" -% ((-3) % 1)   == "!!"
-"%2c" -% (1 % 4)      == "!!"
-"%2c" -% 'a'          == " a"
-"%2c" -% ' '          == "  "
-"%2c" -% 'b'          == " b"
-"%2c" -% 'A'          == " A"
-"%2c" -% 'c'          == " c"
-"%2c" -% '\n'         == " \n"
-"%2c" -% 'd'          == " d"
-"%2c" -% '0'          == " 0"
-"%2c" -% 'e'          == " e"
-"%2c" -% 'B'          == " B"
-"%2c" -% 'f'          == " f"
-"%2c" -% '!'          == " !"
-"%2c" -% False        == "!!"
-"%2c" -% True         == "!!"
-
diff --git a/tests/diff/examples-3i.out b/tests/diff/examples-3i.out
deleted file mode 100644
--- a/tests/diff/examples-3i.out
+++ /dev/null
@@ -1,63 +0,0 @@
-"%3i" -% ""           == "!!!"
-"%3i" -% "a"          == "!!!"
-"%3i" -% "aa"         == "!!!"
-"%3i" -% " "          == "!!!"
-"%3i" -% "aaa"        == "!!!"
-"%3i" -% "a "         == "!!!"
-"%3i" -% " a"         == "!!!"
-"%3i" -% "b"          == "!!!"
-"%3i" -% "aaaa"       == "!!!"
-"%3i" -% "aa "        == "!!!"
-"%3i" -% "a a"        == "!!!"
-"%3i" -% "ab"         == "!!!"
-"%3i" -% 0            == "  0"
-"%3i" -% 1            == "  1"
-"%3i" -% (-1)         == " -1"
-"%3i" -% 2            == "  2"
-"%3i" -% (-2)         == " -2"
-"%3i" -% 3            == "  3"
-"%3i" -% (-3)         == " -3"
-"%3i" -% 4            == "  4"
-"%3i" -% (-4)         == " -4"
-"%3i" -% 5            == "  5"
-"%3i" -% (-5)         == " -5"
-"%3i" -% 6            == "  6"
-"%3i" -% 0.0          == "  0"
-"%3i" -% 1.0          == "  1"
-"%3i" -% 0.5          == "  0"
-"%3i" -% (-1.0)       == " -1"
-"%3i" -% 1.5          == "  2"
-"%3i" -% 0.25         == "  0"
-"%3i" -% Infinity     == "Infinity"
-"%3i" -% 2.0          == "  2"
-"%3i" -% (-0.5)       == " -0"
-"%3i" -% 1.25         == "  1"
-"%3i" -% 0.75         == "  1"
-"%3i" -% (-Infinity)  == "-Infinity"
-"%3i" -% (0 % 1)      == "  0"
-"%3i" -% (1 % 1)      == "  1"
-"%3i" -% ((-1) % 1)   == " -1"
-"%3i" -% (1 % 2)      == "  0"
-"%3i" -% (2 % 1)      == "  2"
-"%3i" -% ((-1) % 2)   == " -0"
-"%3i" -% ((-2) % 1)   == " -2"
-"%3i" -% (1 % 3)      == "  0"
-"%3i" -% (3 % 1)      == "  3"
-"%3i" -% ((-1) % 3)   == " -0"
-"%3i" -% ((-3) % 1)   == " -3"
-"%3i" -% (1 % 4)      == "  0"
-"%3i" -% 'a'          == "!!!"
-"%3i" -% ' '          == "!!!"
-"%3i" -% 'b'          == "!!!"
-"%3i" -% 'A'          == "!!!"
-"%3i" -% 'c'          == "!!!"
-"%3i" -% '\n'         == "!!!"
-"%3i" -% 'd'          == "!!!"
-"%3i" -% '0'          == "!!!"
-"%3i" -% 'e'          == "!!!"
-"%3i" -% 'B'          == "!!!"
-"%3i" -% 'f'          == "!!!"
-"%3i" -% '!'          == "!!!"
-"%3i" -% False        == "!!!"
-"%3i" -% True         == "!!!"
-
diff --git a/tests/diff/examples-5f.out b/tests/diff/examples-5f.out
deleted file mode 100644
--- a/tests/diff/examples-5f.out
+++ /dev/null
@@ -1,63 +0,0 @@
-"%5f" -% ""           == "!!!!!"
-"%5f" -% "a"          == "!!!!!"
-"%5f" -% "aa"         == "!!!!!"
-"%5f" -% " "          == "!!!!!"
-"%5f" -% "aaa"        == "!!!!!"
-"%5f" -% "a "         == "!!!!!"
-"%5f" -% " a"         == "!!!!!"
-"%5f" -% "b"          == "!!!!!"
-"%5f" -% "aaaa"       == "!!!!!"
-"%5f" -% "aa "        == "!!!!!"
-"%5f" -% "a a"        == "!!!!!"
-"%5f" -% "ab"         == "!!!!!"
-"%5f" -% 0            == "  0.0"
-"%5f" -% 1            == "  1.0"
-"%5f" -% (-1)         == " -1.0"
-"%5f" -% 2            == "  2.0"
-"%5f" -% (-2)         == " -2.0"
-"%5f" -% 3            == "  3.0"
-"%5f" -% (-3)         == " -3.0"
-"%5f" -% 4            == "  4.0"
-"%5f" -% (-4)         == " -4.0"
-"%5f" -% 5            == "  5.0"
-"%5f" -% (-5)         == " -5.0"
-"%5f" -% 6            == "  6.0"
-"%5f" -% 0.0          == "  0.0"
-"%5f" -% 1.0          == "  1.0"
-"%5f" -% 0.5          == "  0.5"
-"%5f" -% (-1.0)       == " -1.0"
-"%5f" -% 1.5          == "  1.5"
-"%5f" -% 0.25         == " 0.25"
-"%5f" -% Infinity     == "Infinity"
-"%5f" -% 2.0          == "  2.0"
-"%5f" -% (-0.5)       == " -0.5"
-"%5f" -% 1.25         == " 1.25"
-"%5f" -% 0.75         == " 0.75"
-"%5f" -% (-Infinity)  == "-Infinity"
-"%5f" -% (0 % 1)      == "  0.0"
-"%5f" -% (1 % 1)      == "  1.0"
-"%5f" -% ((-1) % 1)   == " -1.0"
-"%5f" -% (1 % 2)      == "  0.5"
-"%5f" -% (2 % 1)      == "  2.0"
-"%5f" -% ((-1) % 2)   == " -0.5"
-"%5f" -% ((-2) % 1)   == " -2.0"
-"%5f" -% (1 % 3)      == "    0"
-"%5f" -% (3 % 1)      == "  3.0"
-"%5f" -% ((-1) % 3)   == "   -0"
-"%5f" -% ((-3) % 1)   == " -3.0"
-"%5f" -% (1 % 4)      == " 0.25"
-"%5f" -% 'a'          == "!!!!!"
-"%5f" -% ' '          == "!!!!!"
-"%5f" -% 'b'          == "!!!!!"
-"%5f" -% 'A'          == "!!!!!"
-"%5f" -% 'c'          == "!!!!!"
-"%5f" -% '\n'         == "!!!!!"
-"%5f" -% 'd'          == "!!!!!"
-"%5f" -% '0'          == "!!!!!"
-"%5f" -% 'e'          == "!!!!!"
-"%5f" -% 'B'          == "!!!!!"
-"%5f" -% 'f'          == "!!!!!"
-"%5f" -% '!'          == "!!!!!"
-"%5f" -% False        == "!!!!!"
-"%5f" -% True         == "!!!!!"
-
diff --git a/tests/diff/examples-6r.out b/tests/diff/examples-6r.out
deleted file mode 100644
--- a/tests/diff/examples-6r.out
+++ /dev/null
@@ -1,63 +0,0 @@
-"%6r" -% ""           == "    \"\""
-"%6r" -% "a"          == "   \"a\""
-"%6r" -% "aa"         == "  \"aa\""
-"%6r" -% " "          == "   \" \""
-"%6r" -% "aaa"        == " \"aaa\""
-"%6r" -% "a "         == "  \"a \""
-"%6r" -% " a"         == "  \" a\""
-"%6r" -% "b"          == "   \"b\""
-"%6r" -% "aaaa"       == "\"aaaa\""
-"%6r" -% "aa "        == " \"aa \""
-"%6r" -% "a a"        == " \"a a\""
-"%6r" -% "ab"         == "  \"ab\""
-"%6r" -% 0            == "     0"
-"%6r" -% 1            == "     1"
-"%6r" -% (-1)         == "    -1"
-"%6r" -% 2            == "     2"
-"%6r" -% (-2)         == "    -2"
-"%6r" -% 3            == "     3"
-"%6r" -% (-3)         == "    -3"
-"%6r" -% 4            == "     4"
-"%6r" -% (-4)         == "    -4"
-"%6r" -% 5            == "     5"
-"%6r" -% (-5)         == "    -5"
-"%6r" -% 6            == "     6"
-"%6r" -% 0.0          == "   0.0"
-"%6r" -% 1.0          == "   1.0"
-"%6r" -% 0.5          == "   0.5"
-"%6r" -% (-1.0)       == "  -1.0"
-"%6r" -% 1.5          == "   1.5"
-"%6r" -% 0.25         == "  0.25"
-"%6r" -% Infinity     == "Infinity"
-"%6r" -% 2.0          == "   2.0"
-"%6r" -% (-0.5)       == "  -0.5"
-"%6r" -% 1.25         == "  1.25"
-"%6r" -% 0.75         == "  0.75"
-"%6r" -% (-Infinity)  == "-Infinity"
-"%6r" -% (0 % 1)      == " 0 % 1"
-"%6r" -% (1 % 1)      == " 1 % 1"
-"%6r" -% ((-1) % 1)   == "(-1) % 1"
-"%6r" -% (1 % 2)      == " 1 % 2"
-"%6r" -% (2 % 1)      == " 2 % 1"
-"%6r" -% ((-1) % 2)   == "(-1) % 2"
-"%6r" -% ((-2) % 1)   == "(-2) % 1"
-"%6r" -% (1 % 3)      == " 1 % 3"
-"%6r" -% (3 % 1)      == " 3 % 1"
-"%6r" -% ((-1) % 3)   == "(-1) % 3"
-"%6r" -% ((-3) % 1)   == "(-3) % 1"
-"%6r" -% (1 % 4)      == " 1 % 4"
-"%6r" -% 'a'          == "   'a'"
-"%6r" -% ' '          == "   ' '"
-"%6r" -% 'b'          == "   'b'"
-"%6r" -% 'A'          == "   'A'"
-"%6r" -% 'c'          == "   'c'"
-"%6r" -% '\n'         == "  '\\n'"
-"%6r" -% 'd'          == "   'd'"
-"%6r" -% '0'          == "   '0'"
-"%6r" -% 'e'          == "   'e'"
-"%6r" -% 'B'          == "   'B'"
-"%6r" -% 'f'          == "   'f'"
-"%6r" -% '!'          == "   '!'"
-"%6r" -% False        == " False"
-"%6r" -% True         == "  True"
-
diff --git a/tests/diff/examples-6s.out b/tests/diff/examples-6s.out
deleted file mode 100644
--- a/tests/diff/examples-6s.out
+++ /dev/null
@@ -1,63 +0,0 @@
-"%6s" -% ""           == "      "
-"%6s" -% "a"          == "     a"
-"%6s" -% "aa"         == "    aa"
-"%6s" -% " "          == "      "
-"%6s" -% "aaa"        == "   aaa"
-"%6s" -% "a "         == "    a "
-"%6s" -% " a"         == "     a"
-"%6s" -% "b"          == "     b"
-"%6s" -% "aaaa"       == "  aaaa"
-"%6s" -% "aa "        == "   aa "
-"%6s" -% "a a"        == "   a a"
-"%6s" -% "ab"         == "    ab"
-"%6s" -% 0            == "     0"
-"%6s" -% 1            == "     1"
-"%6s" -% (-1)         == "    -1"
-"%6s" -% 2            == "     2"
-"%6s" -% (-2)         == "    -2"
-"%6s" -% 3            == "     3"
-"%6s" -% (-3)         == "    -3"
-"%6s" -% 4            == "     4"
-"%6s" -% (-4)         == "    -4"
-"%6s" -% 5            == "     5"
-"%6s" -% (-5)         == "    -5"
-"%6s" -% 6            == "     6"
-"%6s" -% 0.0          == "   0.0"
-"%6s" -% 1.0          == "   1.0"
-"%6s" -% 0.5          == "   0.5"
-"%6s" -% (-1.0)       == "  -1.0"
-"%6s" -% 1.5          == "   1.5"
-"%6s" -% 0.25         == "  0.25"
-"%6s" -% Infinity     == "Infinity"
-"%6s" -% 2.0          == "   2.0"
-"%6s" -% (-0.5)       == "  -0.5"
-"%6s" -% 1.25         == "  1.25"
-"%6s" -% 0.75         == "  0.75"
-"%6s" -% (-Infinity)  == "-Infinity"
-"%6s" -% (0 % 1)      == " 0 % 1"
-"%6s" -% (1 % 1)      == " 1 % 1"
-"%6s" -% ((-1) % 1)   == "(-1) % 1"
-"%6s" -% (1 % 2)      == " 1 % 2"
-"%6s" -% (2 % 1)      == " 2 % 1"
-"%6s" -% ((-1) % 2)   == "(-1) % 2"
-"%6s" -% ((-2) % 1)   == "(-2) % 1"
-"%6s" -% (1 % 3)      == " 1 % 3"
-"%6s" -% (3 % 1)      == " 3 % 1"
-"%6s" -% ((-1) % 3)   == "(-1) % 3"
-"%6s" -% ((-3) % 1)   == "(-3) % 1"
-"%6s" -% (1 % 4)      == " 1 % 4"
-"%6s" -% 'a'          == "   'a'"
-"%6s" -% ' '          == "   ' '"
-"%6s" -% 'b'          == "   'b'"
-"%6s" -% 'A'          == "   'A'"
-"%6s" -% 'c'          == "   'c'"
-"%6s" -% '\n'         == "  '\\n'"
-"%6s" -% 'd'          == "   'd'"
-"%6s" -% '0'          == "   '0'"
-"%6s" -% 'e'          == "   'e'"
-"%6s" -% 'B'          == "   'B'"
-"%6s" -% 'f'          == "   'f'"
-"%6s" -% '!'          == "   '!'"
-"%6s" -% False        == " False"
-"%6s" -% True         == "  True"
-
diff --git a/tests/diff/examples-X.out b/tests/diff/examples-X.out
deleted file mode 100644
--- a/tests/diff/examples-X.out
+++ /dev/null
@@ -1,63 +0,0 @@
-"%X" -% ""           == "!"
-"%X" -% "a"          == "!"
-"%X" -% "aa"         == "!"
-"%X" -% " "          == "!"
-"%X" -% "aaa"        == "!"
-"%X" -% "a "         == "!"
-"%X" -% " a"         == "!"
-"%X" -% "b"          == "!"
-"%X" -% "aaaa"       == "!"
-"%X" -% "aa "        == "!"
-"%X" -% "a a"        == "!"
-"%X" -% "ab"         == "!"
-"%X" -% 0            == "0"
-"%X" -% 1            == "1"
-"%X" -% (-1)         == "-1"
-"%X" -% 2            == "2"
-"%X" -% (-2)         == "-2"
-"%X" -% 3            == "3"
-"%X" -% (-3)         == "-3"
-"%X" -% 4            == "4"
-"%X" -% (-4)         == "-4"
-"%X" -% 5            == "5"
-"%X" -% (-5)         == "-5"
-"%X" -% 6            == "6"
-"%X" -% 0.0          == "0"
-"%X" -% 1.0          == "1"
-"%X" -% 0.5          == "0.8"
-"%X" -% (-1.0)       == "-1"
-"%X" -% 1.5          == "1.8"
-"%X" -% 0.25         == "0.4"
-"%X" -% Infinity     == "Infinity"
-"%X" -% 2.0          == "2"
-"%X" -% (-0.5)       == "-0.8"
-"%X" -% 1.25         == "1.4"
-"%X" -% 0.75         == "0.C"
-"%X" -% (-Infinity)  == "-Infinity"
-"%X" -% (0 % 1)      == "0"
-"%X" -% (1 % 1)      == "1"
-"%X" -% ((-1) % 1)   == "-1"
-"%X" -% (1 % 2)      == "0.8"
-"%X" -% (2 % 1)      == "2"
-"%X" -% ((-1) % 2)   == "-0.8"
-"%X" -% ((-2) % 1)   == "-2"
-"%X" -% (1 % 3)      == "0"
-"%X" -% (3 % 1)      == "3"
-"%X" -% ((-1) % 3)   == "-0"
-"%X" -% ((-3) % 1)   == "-3"
-"%X" -% (1 % 4)      == "0.4"
-"%X" -% 'a'          == "!"
-"%X" -% ' '          == "!"
-"%X" -% 'b'          == "!"
-"%X" -% 'A'          == "!"
-"%X" -% 'c'          == "!"
-"%X" -% '\n'         == "!"
-"%X" -% 'd'          == "!"
-"%X" -% '0'          == "!"
-"%X" -% 'e'          == "!"
-"%X" -% 'B'          == "!"
-"%X" -% 'f'          == "!"
-"%X" -% '!'          == "!"
-"%X" -% False        == "!"
-"%X" -% True         == "!"
-
diff --git a/tests/diff/examples-_3i.out b/tests/diff/examples-_3i.out
deleted file mode 100644
--- a/tests/diff/examples-_3i.out
+++ /dev/null
@@ -1,63 +0,0 @@
-"% 3i" -% ""           == "!!!"
-"% 3i" -% "a"          == "!!!"
-"% 3i" -% "aa"         == "!!!"
-"% 3i" -% " "          == "!!!"
-"% 3i" -% "aaa"        == "!!!"
-"% 3i" -% "a "         == "!!!"
-"% 3i" -% " a"         == "!!!"
-"% 3i" -% "b"          == "!!!"
-"% 3i" -% "aaaa"       == "!!!"
-"% 3i" -% "aa "        == "!!!"
-"% 3i" -% "a a"        == "!!!"
-"% 3i" -% "ab"         == "!!!"
-"% 3i" -% 0            == "  0"
-"% 3i" -% 1            == "  1"
-"% 3i" -% (-1)         == " -1"
-"% 3i" -% 2            == "  2"
-"% 3i" -% (-2)         == " -2"
-"% 3i" -% 3            == "  3"
-"% 3i" -% (-3)         == " -3"
-"% 3i" -% 4            == "  4"
-"% 3i" -% (-4)         == " -4"
-"% 3i" -% 5            == "  5"
-"% 3i" -% (-5)         == " -5"
-"% 3i" -% 6            == "  6"
-"% 3i" -% 0.0          == "  0"
-"% 3i" -% 1.0          == "  1"
-"% 3i" -% 0.5          == "  0"
-"% 3i" -% (-1.0)       == " -1"
-"% 3i" -% 1.5          == "  2"
-"% 3i" -% 0.25         == "  0"
-"% 3i" -% Infinity     == " Infinity"
-"% 3i" -% 2.0          == "  2"
-"% 3i" -% (-0.5)       == " -0"
-"% 3i" -% 1.25         == "  1"
-"% 3i" -% 0.75         == "  1"
-"% 3i" -% (-Infinity)  == "-Infinity"
-"% 3i" -% (0 % 1)      == "  0"
-"% 3i" -% (1 % 1)      == "  1"
-"% 3i" -% ((-1) % 1)   == " -1"
-"% 3i" -% (1 % 2)      == "  0"
-"% 3i" -% (2 % 1)      == "  2"
-"% 3i" -% ((-1) % 2)   == " -0"
-"% 3i" -% ((-2) % 1)   == " -2"
-"% 3i" -% (1 % 3)      == "  0"
-"% 3i" -% (3 % 1)      == "  3"
-"% 3i" -% ((-1) % 3)   == " -0"
-"% 3i" -% ((-3) % 1)   == " -3"
-"% 3i" -% (1 % 4)      == "  0"
-"% 3i" -% 'a'          == "!!!"
-"% 3i" -% ' '          == "!!!"
-"% 3i" -% 'b'          == "!!!"
-"% 3i" -% 'A'          == "!!!"
-"% 3i" -% 'c'          == "!!!"
-"% 3i" -% '\n'         == "!!!"
-"% 3i" -% 'd'          == "!!!"
-"% 3i" -% '0'          == "!!!"
-"% 3i" -% 'e'          == "!!!"
-"% 3i" -% 'B'          == "!!!"
-"% 3i" -% 'f'          == "!!!"
-"% 3i" -% '!'          == "!!!"
-"% 3i" -% False        == "!!!"
-"% 3i" -% True         == "!!!"
-
diff --git a/tests/diff/examples-abc.out b/tests/diff/examples-abc.out
deleted file mode 100644
--- a/tests/diff/examples-abc.out
+++ /dev/null
@@ -1,63 +0,0 @@
-"abc" -% ""           == "abc"
-"abc" -% "a"          == "abc"
-"abc" -% "aa"         == "abc"
-"abc" -% " "          == "abc"
-"abc" -% "aaa"        == "abc"
-"abc" -% "a "         == "abc"
-"abc" -% " a"         == "abc"
-"abc" -% "b"          == "abc"
-"abc" -% "aaaa"       == "abc"
-"abc" -% "aa "        == "abc"
-"abc" -% "a a"        == "abc"
-"abc" -% "ab"         == "abc"
-"abc" -% 0            == "abc"
-"abc" -% 1            == "abc"
-"abc" -% (-1)         == "abc"
-"abc" -% 2            == "abc"
-"abc" -% (-2)         == "abc"
-"abc" -% 3            == "abc"
-"abc" -% (-3)         == "abc"
-"abc" -% 4            == "abc"
-"abc" -% (-4)         == "abc"
-"abc" -% 5            == "abc"
-"abc" -% (-5)         == "abc"
-"abc" -% 6            == "abc"
-"abc" -% 0.0          == "abc"
-"abc" -% 1.0          == "abc"
-"abc" -% 0.5          == "abc"
-"abc" -% (-1.0)       == "abc"
-"abc" -% 1.5          == "abc"
-"abc" -% 0.25         == "abc"
-"abc" -% Infinity     == "abc"
-"abc" -% 2.0          == "abc"
-"abc" -% (-0.5)       == "abc"
-"abc" -% 1.25         == "abc"
-"abc" -% 0.75         == "abc"
-"abc" -% (-Infinity)  == "abc"
-"abc" -% (0 % 1)      == "abc"
-"abc" -% (1 % 1)      == "abc"
-"abc" -% ((-1) % 1)   == "abc"
-"abc" -% (1 % 2)      == "abc"
-"abc" -% (2 % 1)      == "abc"
-"abc" -% ((-1) % 2)   == "abc"
-"abc" -% ((-2) % 1)   == "abc"
-"abc" -% (1 % 3)      == "abc"
-"abc" -% (3 % 1)      == "abc"
-"abc" -% ((-1) % 3)   == "abc"
-"abc" -% ((-3) % 1)   == "abc"
-"abc" -% (1 % 4)      == "abc"
-"abc" -% 'a'          == "abc"
-"abc" -% ' '          == "abc"
-"abc" -% 'b'          == "abc"
-"abc" -% 'A'          == "abc"
-"abc" -% 'c'          == "abc"
-"abc" -% '\n'         == "abc"
-"abc" -% 'd'          == "abc"
-"abc" -% '0'          == "abc"
-"abc" -% 'e'          == "abc"
-"abc" -% 'B'          == "abc"
-"abc" -% 'f'          == "abc"
-"abc" -% '!'          == "abc"
-"abc" -% False        == "abc"
-"abc" -% True         == "abc"
-
diff --git a/tests/diff/examples-b.out b/tests/diff/examples-b.out
deleted file mode 100644
--- a/tests/diff/examples-b.out
+++ /dev/null
@@ -1,63 +0,0 @@
-"%b" -% ""           == "!"
-"%b" -% "a"          == "!"
-"%b" -% "aa"         == "!"
-"%b" -% " "          == "!"
-"%b" -% "aaa"        == "!"
-"%b" -% "a "         == "!"
-"%b" -% " a"         == "!"
-"%b" -% "b"          == "!"
-"%b" -% "aaaa"       == "!"
-"%b" -% "aa "        == "!"
-"%b" -% "a a"        == "!"
-"%b" -% "ab"         == "!"
-"%b" -% 0            == "0"
-"%b" -% 1            == "1"
-"%b" -% (-1)         == "-1"
-"%b" -% 2            == "10"
-"%b" -% (-2)         == "-10"
-"%b" -% 3            == "11"
-"%b" -% (-3)         == "-11"
-"%b" -% 4            == "100"
-"%b" -% (-4)         == "-100"
-"%b" -% 5            == "101"
-"%b" -% (-5)         == "-101"
-"%b" -% 6            == "110"
-"%b" -% 0.0          == "0"
-"%b" -% 1.0          == "1"
-"%b" -% 0.5          == "0.1"
-"%b" -% (-1.0)       == "-1"
-"%b" -% 1.5          == "1.1"
-"%b" -% 0.25         == "0.01"
-"%b" -% Infinity     == "Infinity"
-"%b" -% 2.0          == "10"
-"%b" -% (-0.5)       == "-0.1"
-"%b" -% 1.25         == "1.01"
-"%b" -% 0.75         == "0.11"
-"%b" -% (-Infinity)  == "-Infinity"
-"%b" -% (0 % 1)      == "0"
-"%b" -% (1 % 1)      == "1"
-"%b" -% ((-1) % 1)   == "-1"
-"%b" -% (1 % 2)      == "0.1"
-"%b" -% (2 % 1)      == "10"
-"%b" -% ((-1) % 2)   == "-0.1"
-"%b" -% ((-2) % 1)   == "-10"
-"%b" -% (1 % 3)      == "0"
-"%b" -% (3 % 1)      == "11"
-"%b" -% ((-1) % 3)   == "-0"
-"%b" -% ((-3) % 1)   == "-11"
-"%b" -% (1 % 4)      == "0.01"
-"%b" -% 'a'          == "!"
-"%b" -% ' '          == "!"
-"%b" -% 'b'          == "!"
-"%b" -% 'A'          == "!"
-"%b" -% 'c'          == "!"
-"%b" -% '\n'         == "!"
-"%b" -% 'd'          == "!"
-"%b" -% '0'          == "!"
-"%b" -% 'e'          == "!"
-"%b" -% 'B'          == "!"
-"%b" -% 'f'          == "!"
-"%b" -% '!'          == "!"
-"%b" -% False        == "!"
-"%b" -% True         == "!"
-
diff --git a/tests/diff/examples-c.out b/tests/diff/examples-c.out
deleted file mode 100644
--- a/tests/diff/examples-c.out
+++ /dev/null
@@ -1,63 +0,0 @@
-"%c" -% ""           == "!"
-"%c" -% "a"          == "!"
-"%c" -% "aa"         == "!"
-"%c" -% " "          == "!"
-"%c" -% "aaa"        == "!"
-"%c" -% "a "         == "!"
-"%c" -% " a"         == "!"
-"%c" -% "b"          == "!"
-"%c" -% "aaaa"       == "!"
-"%c" -% "aa "        == "!"
-"%c" -% "a a"        == "!"
-"%c" -% "ab"         == "!"
-"%c" -% 0            == "!"
-"%c" -% 1            == "!"
-"%c" -% (-1)         == "!"
-"%c" -% 2            == "!"
-"%c" -% (-2)         == "!"
-"%c" -% 3            == "!"
-"%c" -% (-3)         == "!"
-"%c" -% 4            == "!"
-"%c" -% (-4)         == "!"
-"%c" -% 5            == "!"
-"%c" -% (-5)         == "!"
-"%c" -% 6            == "!"
-"%c" -% 0.0          == "!"
-"%c" -% 1.0          == "!"
-"%c" -% 0.5          == "!"
-"%c" -% (-1.0)       == "!"
-"%c" -% 1.5          == "!"
-"%c" -% 0.25         == "!"
-"%c" -% Infinity     == "!"
-"%c" -% 2.0          == "!"
-"%c" -% (-0.5)       == "!"
-"%c" -% 1.25         == "!"
-"%c" -% 0.75         == "!"
-"%c" -% (-Infinity)  == "!"
-"%c" -% (0 % 1)      == "!"
-"%c" -% (1 % 1)      == "!"
-"%c" -% ((-1) % 1)   == "!"
-"%c" -% (1 % 2)      == "!"
-"%c" -% (2 % 1)      == "!"
-"%c" -% ((-1) % 2)   == "!"
-"%c" -% ((-2) % 1)   == "!"
-"%c" -% (1 % 3)      == "!"
-"%c" -% (3 % 1)      == "!"
-"%c" -% ((-1) % 3)   == "!"
-"%c" -% ((-3) % 1)   == "!"
-"%c" -% (1 % 4)      == "!"
-"%c" -% 'a'          == "a"
-"%c" -% ' '          == " "
-"%c" -% 'b'          == "b"
-"%c" -% 'A'          == "A"
-"%c" -% 'c'          == "c"
-"%c" -% '\n'         == "\n"
-"%c" -% 'd'          == "d"
-"%c" -% '0'          == "0"
-"%c" -% 'e'          == "e"
-"%c" -% 'B'          == "B"
-"%c" -% 'f'          == "f"
-"%c" -% '!'          == "!"
-"%c" -% False        == "!"
-"%c" -% True         == "!"
-
diff --git a/tests/diff/examples-f.out b/tests/diff/examples-f.out
deleted file mode 100644
--- a/tests/diff/examples-f.out
+++ /dev/null
@@ -1,63 +0,0 @@
-"%f" -% ""           == "!"
-"%f" -% "a"          == "!"
-"%f" -% "aa"         == "!"
-"%f" -% " "          == "!"
-"%f" -% "aaa"        == "!"
-"%f" -% "a "         == "!"
-"%f" -% " a"         == "!"
-"%f" -% "b"          == "!"
-"%f" -% "aaaa"       == "!"
-"%f" -% "aa "        == "!"
-"%f" -% "a a"        == "!"
-"%f" -% "ab"         == "!"
-"%f" -% 0            == "0.0"
-"%f" -% 1            == "1.0"
-"%f" -% (-1)         == "-1.0"
-"%f" -% 2            == "2.0"
-"%f" -% (-2)         == "-2.0"
-"%f" -% 3            == "3.0"
-"%f" -% (-3)         == "-3.0"
-"%f" -% 4            == "4.0"
-"%f" -% (-4)         == "-4.0"
-"%f" -% 5            == "5.0"
-"%f" -% (-5)         == "-5.0"
-"%f" -% 6            == "6.0"
-"%f" -% 0.0          == "0.0"
-"%f" -% 1.0          == "1.0"
-"%f" -% 0.5          == "0.5"
-"%f" -% (-1.0)       == "-1.0"
-"%f" -% 1.5          == "1.5"
-"%f" -% 0.25         == "0.25"
-"%f" -% Infinity     == "Infinity"
-"%f" -% 2.0          == "2.0"
-"%f" -% (-0.5)       == "-0.5"
-"%f" -% 1.25         == "1.25"
-"%f" -% 0.75         == "0.75"
-"%f" -% (-Infinity)  == "-Infinity"
-"%f" -% (0 % 1)      == "0.0"
-"%f" -% (1 % 1)      == "1.0"
-"%f" -% ((-1) % 1)   == "-1.0"
-"%f" -% (1 % 2)      == "0.5"
-"%f" -% (2 % 1)      == "2.0"
-"%f" -% ((-1) % 2)   == "-0.5"
-"%f" -% ((-2) % 1)   == "-2.0"
-"%f" -% (1 % 3)      == "0"
-"%f" -% (3 % 1)      == "3.0"
-"%f" -% ((-1) % 3)   == "-0"
-"%f" -% ((-3) % 1)   == "-3.0"
-"%f" -% (1 % 4)      == "0.25"
-"%f" -% 'a'          == "!"
-"%f" -% ' '          == "!"
-"%f" -% 'b'          == "!"
-"%f" -% 'A'          == "!"
-"%f" -% 'c'          == "!"
-"%f" -% '\n'         == "!"
-"%f" -% 'd'          == "!"
-"%f" -% '0'          == "!"
-"%f" -% 'e'          == "!"
-"%f" -% 'B'          == "!"
-"%f" -% 'f'          == "!"
-"%f" -% '!'          == "!"
-"%f" -% False        == "!"
-"%f" -% True         == "!"
-
diff --git a/tests/diff/examples-i.out b/tests/diff/examples-i.out
deleted file mode 100644
--- a/tests/diff/examples-i.out
+++ /dev/null
@@ -1,63 +0,0 @@
-"%i" -% ""           == "!"
-"%i" -% "a"          == "!"
-"%i" -% "aa"         == "!"
-"%i" -% " "          == "!"
-"%i" -% "aaa"        == "!"
-"%i" -% "a "         == "!"
-"%i" -% " a"         == "!"
-"%i" -% "b"          == "!"
-"%i" -% "aaaa"       == "!"
-"%i" -% "aa "        == "!"
-"%i" -% "a a"        == "!"
-"%i" -% "ab"         == "!"
-"%i" -% 0            == "0"
-"%i" -% 1            == "1"
-"%i" -% (-1)         == "-1"
-"%i" -% 2            == "2"
-"%i" -% (-2)         == "-2"
-"%i" -% 3            == "3"
-"%i" -% (-3)         == "-3"
-"%i" -% 4            == "4"
-"%i" -% (-4)         == "-4"
-"%i" -% 5            == "5"
-"%i" -% (-5)         == "-5"
-"%i" -% 6            == "6"
-"%i" -% 0.0          == "0"
-"%i" -% 1.0          == "1"
-"%i" -% 0.5          == "0"
-"%i" -% (-1.0)       == "-1"
-"%i" -% 1.5          == "2"
-"%i" -% 0.25         == "0"
-"%i" -% Infinity     == "Infinity"
-"%i" -% 2.0          == "2"
-"%i" -% (-0.5)       == "-0"
-"%i" -% 1.25         == "1"
-"%i" -% 0.75         == "1"
-"%i" -% (-Infinity)  == "-Infinity"
-"%i" -% (0 % 1)      == "0"
-"%i" -% (1 % 1)      == "1"
-"%i" -% ((-1) % 1)   == "-1"
-"%i" -% (1 % 2)      == "0"
-"%i" -% (2 % 1)      == "2"
-"%i" -% ((-1) % 2)   == "-0"
-"%i" -% ((-2) % 1)   == "-2"
-"%i" -% (1 % 3)      == "0"
-"%i" -% (3 % 1)      == "3"
-"%i" -% ((-1) % 3)   == "-0"
-"%i" -% ((-3) % 1)   == "-3"
-"%i" -% (1 % 4)      == "0"
-"%i" -% 'a'          == "!"
-"%i" -% ' '          == "!"
-"%i" -% 'b'          == "!"
-"%i" -% 'A'          == "!"
-"%i" -% 'c'          == "!"
-"%i" -% '\n'         == "!"
-"%i" -% 'd'          == "!"
-"%i" -% '0'          == "!"
-"%i" -% 'e'          == "!"
-"%i" -% 'B'          == "!"
-"%i" -% 'f'          == "!"
-"%i" -% '!'          == "!"
-"%i" -% False        == "!"
-"%i" -% True         == "!"
-
diff --git a/tests/diff/examples-o.out b/tests/diff/examples-o.out
deleted file mode 100644
--- a/tests/diff/examples-o.out
+++ /dev/null
@@ -1,63 +0,0 @@
-"%o" -% ""           == "!"
-"%o" -% "a"          == "!"
-"%o" -% "aa"         == "!"
-"%o" -% " "          == "!"
-"%o" -% "aaa"        == "!"
-"%o" -% "a "         == "!"
-"%o" -% " a"         == "!"
-"%o" -% "b"          == "!"
-"%o" -% "aaaa"       == "!"
-"%o" -% "aa "        == "!"
-"%o" -% "a a"        == "!"
-"%o" -% "ab"         == "!"
-"%o" -% 0            == "0"
-"%o" -% 1            == "1"
-"%o" -% (-1)         == "-1"
-"%o" -% 2            == "2"
-"%o" -% (-2)         == "-2"
-"%o" -% 3            == "3"
-"%o" -% (-3)         == "-3"
-"%o" -% 4            == "4"
-"%o" -% (-4)         == "-4"
-"%o" -% 5            == "5"
-"%o" -% (-5)         == "-5"
-"%o" -% 6            == "6"
-"%o" -% 0.0          == "0"
-"%o" -% 1.0          == "1"
-"%o" -% 0.5          == "0.4"
-"%o" -% (-1.0)       == "-1"
-"%o" -% 1.5          == "1.4"
-"%o" -% 0.25         == "0.2"
-"%o" -% Infinity     == "Infinity"
-"%o" -% 2.0          == "2"
-"%o" -% (-0.5)       == "-0.4"
-"%o" -% 1.25         == "1.2"
-"%o" -% 0.75         == "0.6"
-"%o" -% (-Infinity)  == "-Infinity"
-"%o" -% (0 % 1)      == "0"
-"%o" -% (1 % 1)      == "1"
-"%o" -% ((-1) % 1)   == "-1"
-"%o" -% (1 % 2)      == "0.4"
-"%o" -% (2 % 1)      == "2"
-"%o" -% ((-1) % 2)   == "-0.4"
-"%o" -% ((-2) % 1)   == "-2"
-"%o" -% (1 % 3)      == "0"
-"%o" -% (3 % 1)      == "3"
-"%o" -% ((-1) % 3)   == "-0"
-"%o" -% ((-3) % 1)   == "-3"
-"%o" -% (1 % 4)      == "0.2"
-"%o" -% 'a'          == "!"
-"%o" -% ' '          == "!"
-"%o" -% 'b'          == "!"
-"%o" -% 'A'          == "!"
-"%o" -% 'c'          == "!"
-"%o" -% '\n'         == "!"
-"%o" -% 'd'          == "!"
-"%o" -% '0'          == "!"
-"%o" -% 'e'          == "!"
-"%o" -% 'B'          == "!"
-"%o" -% 'f'          == "!"
-"%o" -% '!'          == "!"
-"%o" -% False        == "!"
-"%o" -% True         == "!"
-
diff --git a/tests/diff/examples-r.out b/tests/diff/examples-r.out
deleted file mode 100644
--- a/tests/diff/examples-r.out
+++ /dev/null
@@ -1,63 +0,0 @@
-"%r" -% ""           == "\"\""
-"%r" -% "a"          == "\"a\""
-"%r" -% "aa"         == "\"aa\""
-"%r" -% " "          == "\" \""
-"%r" -% "aaa"        == "\"aaa\""
-"%r" -% "a "         == "\"a \""
-"%r" -% " a"         == "\" a\""
-"%r" -% "b"          == "\"b\""
-"%r" -% "aaaa"       == "\"aaaa\""
-"%r" -% "aa "        == "\"aa \""
-"%r" -% "a a"        == "\"a a\""
-"%r" -% "ab"         == "\"ab\""
-"%r" -% 0            == "0"
-"%r" -% 1            == "1"
-"%r" -% (-1)         == "-1"
-"%r" -% 2            == "2"
-"%r" -% (-2)         == "-2"
-"%r" -% 3            == "3"
-"%r" -% (-3)         == "-3"
-"%r" -% 4            == "4"
-"%r" -% (-4)         == "-4"
-"%r" -% 5            == "5"
-"%r" -% (-5)         == "-5"
-"%r" -% 6            == "6"
-"%r" -% 0.0          == "0.0"
-"%r" -% 1.0          == "1.0"
-"%r" -% 0.5          == "0.5"
-"%r" -% (-1.0)       == "-1.0"
-"%r" -% 1.5          == "1.5"
-"%r" -% 0.25         == "0.25"
-"%r" -% Infinity     == "Infinity"
-"%r" -% 2.0          == "2.0"
-"%r" -% (-0.5)       == "-0.5"
-"%r" -% 1.25         == "1.25"
-"%r" -% 0.75         == "0.75"
-"%r" -% (-Infinity)  == "-Infinity"
-"%r" -% (0 % 1)      == "0 % 1"
-"%r" -% (1 % 1)      == "1 % 1"
-"%r" -% ((-1) % 1)   == "(-1) % 1"
-"%r" -% (1 % 2)      == "1 % 2"
-"%r" -% (2 % 1)      == "2 % 1"
-"%r" -% ((-1) % 2)   == "(-1) % 2"
-"%r" -% ((-2) % 1)   == "(-2) % 1"
-"%r" -% (1 % 3)      == "1 % 3"
-"%r" -% (3 % 1)      == "3 % 1"
-"%r" -% ((-1) % 3)   == "(-1) % 3"
-"%r" -% ((-3) % 1)   == "(-3) % 1"
-"%r" -% (1 % 4)      == "1 % 4"
-"%r" -% 'a'          == "'a'"
-"%r" -% ' '          == "' '"
-"%r" -% 'b'          == "'b'"
-"%r" -% 'A'          == "'A'"
-"%r" -% 'c'          == "'c'"
-"%r" -% '\n'         == "'\\n'"
-"%r" -% 'd'          == "'d'"
-"%r" -% '0'          == "'0'"
-"%r" -% 'e'          == "'e'"
-"%r" -% 'B'          == "'B'"
-"%r" -% 'f'          == "'f'"
-"%r" -% '!'          == "'!'"
-"%r" -% False        == "False"
-"%r" -% True         == "True"
-
diff --git a/tests/diff/examples-s.out b/tests/diff/examples-s.out
deleted file mode 100644
--- a/tests/diff/examples-s.out
+++ /dev/null
@@ -1,63 +0,0 @@
-"%s" -% ""           == ""
-"%s" -% "a"          == "a"
-"%s" -% "aa"         == "aa"
-"%s" -% " "          == " "
-"%s" -% "aaa"        == "aaa"
-"%s" -% "a "         == "a "
-"%s" -% " a"         == " a"
-"%s" -% "b"          == "b"
-"%s" -% "aaaa"       == "aaaa"
-"%s" -% "aa "        == "aa "
-"%s" -% "a a"        == "a a"
-"%s" -% "ab"         == "ab"
-"%s" -% 0            == "0"
-"%s" -% 1            == "1"
-"%s" -% (-1)         == "-1"
-"%s" -% 2            == "2"
-"%s" -% (-2)         == "-2"
-"%s" -% 3            == "3"
-"%s" -% (-3)         == "-3"
-"%s" -% 4            == "4"
-"%s" -% (-4)         == "-4"
-"%s" -% 5            == "5"
-"%s" -% (-5)         == "-5"
-"%s" -% 6            == "6"
-"%s" -% 0.0          == "0.0"
-"%s" -% 1.0          == "1.0"
-"%s" -% 0.5          == "0.5"
-"%s" -% (-1.0)       == "-1.0"
-"%s" -% 1.5          == "1.5"
-"%s" -% 0.25         == "0.25"
-"%s" -% Infinity     == "Infinity"
-"%s" -% 2.0          == "2.0"
-"%s" -% (-0.5)       == "-0.5"
-"%s" -% 1.25         == "1.25"
-"%s" -% 0.75         == "0.75"
-"%s" -% (-Infinity)  == "-Infinity"
-"%s" -% (0 % 1)      == "0 % 1"
-"%s" -% (1 % 1)      == "1 % 1"
-"%s" -% ((-1) % 1)   == "(-1) % 1"
-"%s" -% (1 % 2)      == "1 % 2"
-"%s" -% (2 % 1)      == "2 % 1"
-"%s" -% ((-1) % 2)   == "(-1) % 2"
-"%s" -% ((-2) % 1)   == "(-2) % 1"
-"%s" -% (1 % 3)      == "1 % 3"
-"%s" -% (3 % 1)      == "3 % 1"
-"%s" -% ((-1) % 3)   == "(-1) % 3"
-"%s" -% ((-3) % 1)   == "(-3) % 1"
-"%s" -% (1 % 4)      == "1 % 4"
-"%s" -% 'a'          == "'a'"
-"%s" -% ' '          == "' '"
-"%s" -% 'b'          == "'b'"
-"%s" -% 'A'          == "'A'"
-"%s" -% 'c'          == "'c'"
-"%s" -% '\n'         == "'\\n'"
-"%s" -% 'd'          == "'d'"
-"%s" -% '0'          == "'0'"
-"%s" -% 'e'          == "'e'"
-"%s" -% 'B'          == "'B'"
-"%s" -% 'f'          == "'f'"
-"%s" -% '!'          == "'!'"
-"%s" -% False        == "False"
-"%s" -% True         == "True"
-
diff --git a/tests/diff/examples-x.out b/tests/diff/examples-x.out
deleted file mode 100644
--- a/tests/diff/examples-x.out
+++ /dev/null
@@ -1,63 +0,0 @@
-"%x" -% ""           == "!"
-"%x" -% "a"          == "!"
-"%x" -% "aa"         == "!"
-"%x" -% " "          == "!"
-"%x" -% "aaa"        == "!"
-"%x" -% "a "         == "!"
-"%x" -% " a"         == "!"
-"%x" -% "b"          == "!"
-"%x" -% "aaaa"       == "!"
-"%x" -% "aa "        == "!"
-"%x" -% "a a"        == "!"
-"%x" -% "ab"         == "!"
-"%x" -% 0            == "0"
-"%x" -% 1            == "1"
-"%x" -% (-1)         == "-1"
-"%x" -% 2            == "2"
-"%x" -% (-2)         == "-2"
-"%x" -% 3            == "3"
-"%x" -% (-3)         == "-3"
-"%x" -% 4            == "4"
-"%x" -% (-4)         == "-4"
-"%x" -% 5            == "5"
-"%x" -% (-5)         == "-5"
-"%x" -% 6            == "6"
-"%x" -% 0.0          == "0"
-"%x" -% 1.0          == "1"
-"%x" -% 0.5          == "0.8"
-"%x" -% (-1.0)       == "-1"
-"%x" -% 1.5          == "1.8"
-"%x" -% 0.25         == "0.4"
-"%x" -% Infinity     == "Infinity"
-"%x" -% 2.0          == "2"
-"%x" -% (-0.5)       == "-0.8"
-"%x" -% 1.25         == "1.4"
-"%x" -% 0.75         == "0.c"
-"%x" -% (-Infinity)  == "-Infinity"
-"%x" -% (0 % 1)      == "0"
-"%x" -% (1 % 1)      == "1"
-"%x" -% ((-1) % 1)   == "-1"
-"%x" -% (1 % 2)      == "0.8"
-"%x" -% (2 % 1)      == "2"
-"%x" -% ((-1) % 2)   == "-0.8"
-"%x" -% ((-2) % 1)   == "-2"
-"%x" -% (1 % 3)      == "0"
-"%x" -% (3 % 1)      == "3"
-"%x" -% ((-1) % 3)   == "-0"
-"%x" -% ((-3) % 1)   == "-3"
-"%x" -% (1 % 4)      == "0.4"
-"%x" -% 'a'          == "!"
-"%x" -% ' '          == "!"
-"%x" -% 'b'          == "!"
-"%x" -% 'A'          == "!"
-"%x" -% 'c'          == "!"
-"%x" -% '\n'         == "!"
-"%x" -% 'd'          == "!"
-"%x" -% '0'          == "!"
-"%x" -% 'e'          == "!"
-"%x" -% 'B'          == "!"
-"%x" -% 'f'          == "!"
-"%x" -% '!'          == "!"
-"%x" -% False        == "!"
-"%x" -% True         == "!"
-
diff --git a/tests/diff/examples.out b/tests/diff/examples.out
deleted file mode 100644
--- a/tests/diff/examples.out
+++ /dev/null
@@ -1,63 +0,0 @@
-"%r" -% ""           == "\"\""
-"%r" -% "a"          == "\"a\""
-"%r" -% "aa"         == "\"aa\""
-"%r" -% " "          == "\" \""
-"%r" -% "aaa"        == "\"aaa\""
-"%r" -% "a "         == "\"a \""
-"%r" -% " a"         == "\" a\""
-"%r" -% "b"          == "\"b\""
-"%r" -% "aaaa"       == "\"aaaa\""
-"%r" -% "aa "        == "\"aa \""
-"%r" -% "a a"        == "\"a a\""
-"%r" -% "ab"         == "\"ab\""
-"%r" -% 0            == "0"
-"%r" -% 1            == "1"
-"%r" -% (-1)         == "-1"
-"%r" -% 2            == "2"
-"%r" -% (-2)         == "-2"
-"%r" -% 3            == "3"
-"%r" -% (-3)         == "-3"
-"%r" -% 4            == "4"
-"%r" -% (-4)         == "-4"
-"%r" -% 5            == "5"
-"%r" -% (-5)         == "-5"
-"%r" -% 6            == "6"
-"%r" -% 0.0          == "0.0"
-"%r" -% 1.0          == "1.0"
-"%r" -% 0.5          == "0.5"
-"%r" -% (-1.0)       == "-1.0"
-"%r" -% 1.5          == "1.5"
-"%r" -% 0.25         == "0.25"
-"%r" -% Infinity     == "Infinity"
-"%r" -% 2.0          == "2.0"
-"%r" -% (-0.5)       == "-0.5"
-"%r" -% 1.25         == "1.25"
-"%r" -% 0.75         == "0.75"
-"%r" -% (-Infinity)  == "-Infinity"
-"%r" -% (0 % 1)      == "0 % 1"
-"%r" -% (1 % 1)      == "1 % 1"
-"%r" -% ((-1) % 1)   == "(-1) % 1"
-"%r" -% (1 % 2)      == "1 % 2"
-"%r" -% (2 % 1)      == "2 % 1"
-"%r" -% ((-1) % 2)   == "(-1) % 2"
-"%r" -% ((-2) % 1)   == "(-2) % 1"
-"%r" -% (1 % 3)      == "1 % 3"
-"%r" -% (3 % 1)      == "3 % 1"
-"%r" -% ((-1) % 3)   == "(-1) % 3"
-"%r" -% ((-3) % 1)   == "(-3) % 1"
-"%r" -% (1 % 4)      == "1 % 4"
-"%r" -% 'a'          == "'a'"
-"%r" -% ' '          == "' '"
-"%r" -% 'b'          == "'b'"
-"%r" -% 'A'          == "'A'"
-"%r" -% 'c'          == "'c'"
-"%r" -% '\n'         == "'\\n'"
-"%r" -% 'd'          == "'d'"
-"%r" -% '0'          == "'0'"
-"%r" -% 'e'          == "'e'"
-"%r" -% 'B'          == "'B'"
-"%r" -% 'f'          == "'f'"
-"%r" -% '!'          == "'!'"
-"%r" -% False        == "False"
-"%r" -% True         == "True"
-
diff --git a/tests/test-number.hs b/tests/test-number.hs
deleted file mode 100644
--- a/tests/test-number.hs
+++ /dev/null
@@ -1,186 +0,0 @@
--- Copyright (c) 2018 Rudy Matela.
--- Distributed under the 3-Clause BSD licence (see the file LICENSE).
-import Test
-
-import Text.PercentFormat
-import Text.PercentFormat.Quotient (Quotient)
-import Data.List (isInfixOf)
-
-import qualified Data.Ratio as R
-
-main :: IO ()
-main = reportTests tests
-
-tests :: [Bool]
-tests =
-  [ True
-
-  -- single digits, positives
-  , "%i" % 1 == "1"
-  , "%d" % 2 == "2"
-  , "%x" % 3 == "3"
-  , "%o" % 4 == "4"
-  , "%b" % 5 == "101"
-  , "%f" % 6 == "6.0"
-
-  -- double digits, positives
-  , "%i" % 12 == "12"
-  , "%d" % 23 == "23"
-  , "%x" % 34 == "22"
-  , "%o" % 45 == "55"
-  , "%b" % 56 == "111000"
-  , "%f" % 67 == "67.0"
-
-  -- single digits, negatives
-  , "%i" % (-1) == "-1"
-  , "%d" % (-2) == "-2"
-  , "%x" % (-3) == "-3"
-  , "%o" % (-4) == "-4"
-  , "%b" % (-5) == "-101"
-  , "%f" % (-6) == "-6.0"
-
-  -- double digits, negatives
-  , "%i" % (-12) == "-12"
-  , "%d" % (-23) == "-23"
-  , "%x" % (-34) == "-22"
-  , "%o" % (-45) == "-55"
-  , "%b" % (-56) == "-111000"
-  , "%f" % (-67) == "-67.0"
-
-  -- Infinity
-  , "%f" % (1.0 / 0.0) == "Infinity"
-  , "%i" % (1.0 / 0.0) == "Infinity"
-  , "%d" % (1.0 / 0.0) == "Infinity"
-  , "%x" % (1.0 / 0.0) == "Infinity"
-  , "%o" % (1.0 / 0.0) == "Infinity"
-  , and $ [ "%%%i%c" -%% (n,c) -% (1.0 / 0.0) == "Infinity"
-          | n <- [-7..7], c <- "idxobf" ]
-
-  -- -Infinity
-  , "%f" % (-1.0 / 0.0) == "-Infinity"
-  , "%i" % (-1.0 / 0.0) == "-Infinity"
-  , "%d" % (-1.0 / 0.0) == "-Infinity"
-  , "%x" % (-1.0 / 0.0) == "-Infinity"
-  , "%o" % (-1.0 / 0.0) == "-Infinity"
-
-  -- NaN
-  , "%f" % (0.0 / 0.0) == "NaN"
-  , "%i" % (0.0 / 0.0) == "NaN"
-  , "%d" % (0.0 / 0.0) == "NaN"
-  , "%x" % (0.0 / 0.0) == "NaN"
-  , "%o" % (0.0 / 0.0) == "NaN"
-  , and $ [ "NaN" `isInfixOf` ("%%%i%c" -%% (n,c) -% (0.0 / 0.0))
-          | n <- [-7..7], c <- "idxobf" ]
-
-  -- decimal fractional digits
-  , "%f" % 1 == "1.0"
-  , "%f" % 1.1 == "1.1"
-  , "%f" % (10.0 / 3.0) == show (10.0 / 3.0)
-  , "%.3f" % (10.0 / 3.0) == "3.333"
-  , "%1.2f" % 1.1 == "1.10"
-  , "%06.3f" % 1.23 == "01.230"
-  , "%.1f" % 1.14 == "1.1"
-  , "%.3f" % (-1.2) == "-1.200"
-  , "%.1f" % 1.16 == "1.2"
-  , "%.1f" % 1.15 == "1.2"  -- round to the nearest even number
-  , "%.1f" % 1.25 == "1.2"  -- round to the nearest even number
-  , "%15.7f" % 1234567.1234567 == "1234567.1234567"
-  , "%17.8f" % (12345678.12345678 :: Quotient) == "12345678.12345678"
---, "%17.8f" % 12345678.12345678 == "12345678.12345678"  -- GHC
---, "%17.8f" % 12345678.12345678 == "12345678.12345680"  -- Hugs
-
-  -- fractional digits in other bases
-  , "%.2x" % (1.0 / 200.0) == "0.01"
-  , "%.2x" % (3.0 / 200.0) == "0.04"
-  , "%.8b" % (1.0 / 200.0) == "0.00000001"
-  , "%.8b" % (3.0 / 200.0) == "0.00000100"
-  , "%.1x" % (3.0 / 2.0) == "1.8"
-  , "%.1b" % (3.0 / 2.0) == "1.1"
-  , "%.0b" % (3.0 / 2.0) == "10"
-  , "%.0b" % (1.0 / 2.0) == "0"
-
-  -- %i rounds to the nearest integer, unless precision is specified
-  , "%i"   % 3.1 == "3"
-  , "%.*i" % 3.1 == "3.1"
-  , "%.2i" % 3.1 == "3.10"
-  , "%.*i" % 3.141 == "3.141"
-  , "%.2i" % 3.141 == "3.14"
-
-  -- %f shows a minimum of one fractional digit
-  , "%f" % 6 == "6.0"
-  , "%f" % 12 == "12.0"
-
-  -- positive/negative signal placement
-  , "%+i" % 1 == "+1"
-  , "% i" % 1 == " 1"
-  , "%+f" % 1.2 == "+1.2"
-  , "% f" % 1.2 == " 1.2"
-  , "%3d" % (-1) == " -1"
-  , "%4d" % (-1) == "  -1"
-  , "%03d" % (-1) == "-01"
-  , "%04d" % (-1) == "-001"
-  , "%+3d" % 1 == " +1"
-  , "%+4d" % 1 == "  +1"
-  , "%+03d" % 1 == "+01"
-  , "%+04d" % 1 == "+001"
-  , "% 07.3f" %   3.3  == " 03.300"
-  , "% 07.3f" % (-3.3) == "-03.300"
-  , "% 7.3f"  %   3.3  == "  3.300"
-  , "% 7.3f"  % (-3.3) == " -3.300"
-
-  , "%07.3d" -% 10.5 == "010.500"
-  , "%07.3x" -% 10.5 == "00a.800"
-  , "%07.3b" -% 10.5 == "1010.100"
-
-  -- Ratios
-  , "asdf %r qwer" -% (10 R.% 3) == "asdf 10 % 3 qwer"
-  , "asdf %07.3f qwer" -% (10 R.% 3) == "asdf 003.333 qwer"
-
-  , "%x" -% 0xfedcba9876543210 == "fedcba9876543210"
-  , "%X" -% 0xFEDCBA9876543210 == "FEDCBA9876543210"
-
-  , "%i"    % pi == "3"
-  , "%.8d"  % pi == "3.14159265"
---, "%d"    % pi == "3.14159265358979"   -- Hugs
---, "%d"    % pi == "3.141592653589793"  -- GHC
-  , "%.8x" % pi == "3.243f6a89"
-  , "%.12b" % pi == "11.001001000100"
-
-
--- TODO: in the future, also handle Ratios nicely:
--- NOTE: use 360 or 5040 as a default divisor (max precision)
--- '/' can be just an alias for '.'
---, "%q" % (2/3 :: Rational) == "2/3"
---, "%q" % (2/3 :: Rational) == "2/3"
---, "%Q" % (2/3 :: Rational) == "2 % 3"
---, "%q" % 0.333 == "1/3"
---, "%q" % 0 == "0/1"
---, "%q" % 1 == "1/1"
---, "%q" % 2 == "2/1"
---, "%/12q" % 0.333 == "1/3"
---, "%/3q" % (3/12) == "1/3"
---, "%4/3q" % (3/12) == " 1/3"
--- why not use /N for exact precision?
--- one can just format manually using %i/%i
--- or even use %/*q
-
-  -- error handling
-  , "%i"   % "a" == "!"
-  , "%d"   % "a" == "!"
-  , "%x"   % "a" == "!"
-  , "%o"   % "a" == "!"
-  , "%b"   % "a" == "!"
-  , "%f"   % "a" == "!"
-  , "%1i"  % "b" == "!"
-  , "%2d"  % "c" == "!!"
-  , "%3x"  % " " == "!!!"
-  , "%4o"  % "!" == "!!!!"
-  , "%5b"  % "." == "!!!!!"
-  , "%6f"  % "-" == "!!!!!!"
-  , "%01f" % "A" == "!"
-  , "%02b" % "B" == "!!"
-  , "%03o" % "C" == "!!!"
-  , "%04x" % "%" == "!!!!"
-  , "%05d" % "/" == "!!!!!"
-  , "%06i" % "^" == "!!!!!!"
-  ]
diff --git a/tests/test-prop.hs b/tests/test-prop.hs
deleted file mode 100644
--- a/tests/test-prop.hs
+++ /dev/null
@@ -1,26 +0,0 @@
--- Copyright (c) 2018 Rudy Matela.
--- Distributed under the 3-Clause BSD licence (see the file LICENSE).
-import Test
-import Text.PercentFormat
-import Test.LeanCheck
-
-main :: IO ()
-main = reportTests (tests 10000)
-
-tests :: Int -> [Bool]
-tests n =
-  [ True
-  , holds n $ \s -> s == "%s" -% s
-  , holds n $ \s t -> s ++ t == "%s%s" % s -% t
-  , holds n $ \s t -> s ++ "%" ++ t == "%s%%%s" % s -% t
-  , holds n $ \s -> s ++ s == "%s%s" % s -% s
-  , holds n $ \s1 s2 s3 -> s1 ++ s2 ++ s3 == (s1 ++ "%s" ++ s3) -% s2
-  , holds n $ \s -> show s == "%r" -% (s::String)
-  , holds n $ \x -> show x == "%r" -% (x::Int)
-  , holds n $ \c -> show c == "%r" -% (c::Char)
-  , holds n $ \f -> show f == "%r" -% (f::Float)
-  , holds n $ \i -> show i == "%i" -% (i::Int)
-  , holds n $ \f -> 'e' `notElem` show f -- TODO: == %f or == %e
-                ==> show f == "%f" -% (f::Float)
-  , holds n $ \c -> c:""   == "%c" -% (c::Char)
-  ]
diff --git a/tests/test-quotient.hs b/tests/test-quotient.hs
deleted file mode 100644
--- a/tests/test-quotient.hs
+++ /dev/null
@@ -1,56 +0,0 @@
--- Copyright (c) 2018 Rudy Matela.
--- Distributed under the 3-Clause BSD licence (see the file LICENSE).
-import Test
-
-import Test.LeanCheck
-import Test.LeanCheck.Utils
-
-import Text.PercentFormat.Quotient as Q
-import Text.PercentFormat.Utils
-
-quotient :: Quotient
-quotient  =  error "dummy quotient value"
-
-instance Listable Quotient where
-  tiers  =  mapT (uncurry (Q.%)) . reset
-         $  tiers `suchThat` canonical
-    where
-    --canonical (0,0)  =  True
-    --canonical (1,0)  =  True
-    canonical (n,d)  =  d > 0 && n `gcd` d == 1
-
-main :: IO ()
-main = reportTests (tests 360)
-
-tests :: Int -> [Bool]
-tests n =
-  [ True
-
-  , holds n $ commutative ((+) -:> quotient)
-  , holds n $ associative ((+) -:> quotient)
-  , holds n $ commutative ((*) -:> quotient)
-  , holds n $ associative ((*) -:> quotient)
-  , holds n $ distributive (*) ((+) -:> quotient)
-  , holds n $ idempotent (+0) -:> quotient
-  , holds n $ idempotent (*1) -:> quotient
-  , holds n $ idempotent abs -:> quotient
-  , holds n $ idempotent signum -:> quotient
-  , holds n $ \x -> negate (negate x) == (x -: quotient)
-  , holds n $ \x -> abs x * signum x == (x -: quotient)
-
-  , holds n $ \q r s -> none Q.isNaN [q,r,s] ==> okEqOrd q r s
---, holds n $ okNum -:> quotient  -- TODO: when new LeanCheck is released
-
-  , readQ "Infinity" == infinity
-  , readQ "-Infinity" == -infinity
-  , let nan' = readQ "NaN" in nan' /= nan'
-  , maybeReadQ "blah" == Nothing
-  , readQ "10" == 10
-  , readQ "-300" == (-300)
-  , readQ "10.10" == 101 % 10
-  , readQ "10.1" == 101 % 10
-  , readQ "33.3e2" == 3330
-  , readQ "3.33e2" == 333
-  , round (1/2 :: Quotient) == 0
-  , round (3/2 :: Quotient) == 2
-  ]
diff --git a/tests/test-scientific.hs b/tests/test-scientific.hs
deleted file mode 100644
--- a/tests/test-scientific.hs
+++ /dev/null
@@ -1,56 +0,0 @@
--- Copyright (c) 2018 Rudy Matela.
--- Distributed under the 3-Clause BSD licence (see the file LICENSE).
-import Test
-
-import Text.PercentFormat
-import Data.List (isInfixOf)
-
-import qualified Data.Ratio as R
-
-main :: IO ()
-main = reportTests tests
-
-tests :: [Bool]
-tests =
-  [ True
-
-{-
-  -- TODO: make the following pass:
-  , "%e" -% 0 == "0.0e0"
-  , "%e" -% 1 == "1.0e0"
-  , "%e" -% 2 == "2.0e0"
-  , "%e" -% 0.1   == "1.0e-1"
-  , "%e" -% 0.12  == "1.2e-1"
-  , "%e" -% 0.123 == "1.23e-1"
-  , "%e" -% 1.0   == "1.0e0"
-  , "%e" -% 1.2   == "1.2e0"
-  , "%e" -% 1.23  == "1.23e0"
-  , "%e" -% 10.0  == "1.0e1"
-  , "%e" -% 12.0  == "1.2e1"
-  , "%e" -% 12.3  == "1.23e1"
-  , "%.1e" -% 0     == "0.0e0"
-  , "%.1e" -% 1     == "1.0e0"
-  , "%.1e" -% 2     == "2.0e0"
-  , "%.1e" -% 0.1   == "1.0e-1"
-  , "%.1e" -% 0.12  == "1.2e-1"
-  , "%.1e" -% 0.123 == "1.2e-1"
-  , "%.1e" -% 1.0   == "1.0e0"
-  , "%.1e" -% 1.2   == "1.2e0"
-  , "%.1e" -% 1.23  == "1.2e0"
-  , "%.1e" -% 10.0  == "1.0e1"
-  , "%.1e" -% 12.0  == "1.2e1"
-  , "%.1e" -% 12.3  == "1.2e1"
-  , "%.2e" -% 0     == "0.00e0"
-  , "%.2e" -% 1     == "1.00e0"
-  , "%.2e" -% 2     == "2.00e0"
-  , "%.2e" -% 0.1   == "1.00e-1"
-  , "%.2e" -% 0.12  == "1.20e-1"
-  , "%.2e" -% 0.123 == "1.23e-1"
-  , "%.2e" -% 1.0   == "1.00e0"
-  , "%.2e" -% 1.2   == "1.20e0"
-  , "%.2e" -% 1.23  == "1.23e0"
-  , "%.2e" -% 10.0  == "1.00e1"
-  , "%.2e" -% 12.0  == "1.20e1"
-  , "%.2e" -% 12.3  == "1.23e1"
--}
-  ]
diff --git a/tests/test-sdist b/tests/test-sdist
deleted file mode 100644
--- a/tests/test-sdist
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/bash
-#
-# test-sdist: tests the package generated by "cabal sdist".
-#
-# Copyright (c) 2015-2018 Rudy Matela.
-# Distributed under the 3-Clause BSD licence.
-#
-# TODO: also run "make test"
-# TODO: also run "stack test"
-pkgver=` cat *.cabal | grep "^version:" | sed -e "s/version: *//"`
-pkgname=`cat *.cabal | grep "^name:"    | sed -e "s/name: *//"`
-pkg=$pkgname-$pkgver
-set -x
-cabal sdist &&
-cd dist &&
-rm -rf $pkg/ &&
-tar -xzf $pkg.tar.gz &&
-cd $pkg/ &&
-cabal configure --enable-tests --enable-benchmarks &&
-cabal build &&
-cabal test &&
-cd .. &&
-if [ -d ../.git ]
-then
-	git -C .. ls-files                                      | sort > ls-git   &&
-	tar -tf $pkg.tar.gz | grep -v "/$" | sed -e "s,$pkg/,," | sort > ls-cabal &&
-	diff -rud ls-git ls-cabal &&
-	rm -f ls-git ls-cabal
-else
-	true # skip test
-fi
diff --git a/tests/test-spec.hs b/tests/test-spec.hs
deleted file mode 100644
--- a/tests/test-spec.hs
+++ /dev/null
@@ -1,48 +0,0 @@
--- Copyright (c) 2018 Rudy Matela.
--- Distributed under the 3-Clause BSD licence (see the file LICENSE).
-import Test
-
-import Text.PercentFormat.Spec
-
-main :: IO ()
-main = reportTests tests
-
-tests :: [Bool]
-tests =
-  [ True
-  , parseSpec "%"    ==- spec {ty = Percent}
-  , parseSpec "r"    ==- spec {ty = ReprSpec}
-  , parseSpec "s"    ==- spec {ty = StringSpec}
-  , parseSpec "10s"  ==- spec {ty = StringSpec,  width = 10}
-  , parseSpec "21s"  ==- spec {ty = StringSpec,  width = 21}
-  , parseSpec "d"    ==- spec {ty = NumberSpec}
-  , parseSpec "4d"   ==- spec {ty = NumberSpec, width =  4,  base = 10}
-  , parseSpec "6d"   ==- spec {ty = NumberSpec, width =  6,  base = 10}
-  , parseSpec "07d"  ==- spec {ty = NumberSpec, width =  7,  padWith = '0'}
-  , parseSpec "073d" ==- spec {ty = NumberSpec, width =  73, padWith = '0'}
-  , parseSpec "6i"   ==- spec {ty = NumberSpec, width =  6,  base = 10, precision = Just 0}
-  , parseSpec "07i"  ==- spec {ty = NumberSpec, width =  7,  padWith = '0', precision = Just 0}
-  , parseSpec "07.*i" ==- spec {ty = NumberSpec, width =  7,  padWith = '0'}
-  , parseSpec "073i" ==- spec {ty = NumberSpec, width =  73, padWith = '0', precision = Just 0}
-  , parseSpec "x"    ==- spec {ty = NumberSpec, base = 16}
-  , parseSpec "X"    ==- spec {ty = NumberSpec, base = 16, capitalizeDigits = True}
-  , parseSpec "o"    ==- spec {ty = NumberSpec, base =  8}
-  , parseSpec "b"    ==- spec {ty = NumberSpec, base =  2}
-  , parseSpec "d"    ==- spec {ty = NumberSpec, positivePrefix=""}
-  , parseSpec "+d"   ==- spec {ty = NumberSpec, positivePrefix="+"}
-  , parseSpec " d"   ==- spec {ty = NumberSpec, positivePrefix=" "}
-  , parseSpec "i"    ==- spec {ty = NumberSpec, positivePrefix="", precision = Just 0}
-  , parseSpec "+i"   ==- spec {ty = NumberSpec, positivePrefix="+", precision = Just 0}
-  , parseSpec " i"   ==- spec {ty = NumberSpec, positivePrefix=" ", precision = Just 0}
-  , parseSpec ".*i"  ==- spec {ty = NumberSpec, positivePrefix=""}
-  , parseSpec "f"    ==- spec {ty = NumberSpec, minPrecision = 1}
-  , parseSpec "3f"   ==- spec {ty = NumberSpec, minPrecision = 1, width = 3}
-  , parseSpec "4.1f" ==- spec {ty = NumberSpec, minPrecision = 1, width = 4, precision = Just 1}
-  , parseSpec "4.0f" ==- spec {ty = NumberSpec, minPrecision = 1, width = 4, precision = Just 0}
-  , parseSpec "4.f"  ==- spec {ty = NumberSpec, minPrecision = 1, width = 4, precision = Just 0}
-  , parseSpec "f"    ==- spec {ty = NumberSpec, minPrecision = 1, positivePrefix=""}
-  , parseSpec "+f"   ==- spec {ty = NumberSpec, minPrecision = 1, positivePrefix="+"}
-  , parseSpec " f"   ==- spec {ty = NumberSpec, minPrecision = 1, positivePrefix=" "}
-    ]
-  where
-  x ==- y = x == (y,"")
diff --git a/tests/test-unit.hs b/tests/test-unit.hs
deleted file mode 100644
--- a/tests/test-unit.hs
+++ /dev/null
@@ -1,49 +0,0 @@
--- Copyright (c) 2018 Rudy Matela.
--- Distributed under the 3-Clause BSD licence (see the file LICENSE).
-import Test
-
-import Text.PercentFormat
-
-main :: IO ()
-main = reportTests tests
-
-tests :: [Bool]
-tests =
-  [ True
-
-  , "asdf qwer"      % "asdf" ==  "asdf qwer"
-  , "zxcv qwer"      % "asdf" ==  "zxcv qwer"
-  , "asdf %s qwer"   % "asdf" ==  "asdf asdf qwer"
-  , "asdf %5s qwer"  % "asdf" ==  "asdf  asdf qwer"
-  , "asdf %5-s qwer" % "asdf" ==  "asdf asdf  qwer"
-  , "%s" % "1%" == "1%%"
-  , "%s" -% "1%" == "1%"
-
-  , "asdf %d qwer"   % 10     ==  "asdf 10 qwer"
-  , "asdf %2d qwer"  %  9     ==  "asdf  9 qwer"
-  , "asdf %02d qwer" %  9     ==  "asdf 09 qwer"
-  , "asdf %012d qwer" % 123   ==  "asdf 000000000123 qwer"
-
-  , "asdf %x qwer" % 10       ==  "asdf a qwer"
-  , "asdf %04x qwer" % 10     ==  "asdf 000a qwer"
-  , "asdf %o qwer"   % 10     ==  "asdf 12 qwer"
-  , "asdf %03o qwer" % 10     ==  "asdf 012 qwer"
-  , "%b" % 10 == "1010"
-  , "%08b" % 10 == "00001010"
-  , "asdf %X qwer" % 10       ==  "asdf A qwer"
-
-  , "%c" % 'c' == "c"
-  , "%r" % 'c' == "'c'"
-
-  , "%s" % 10 == "10"
-
-  , "%c"   % "a" == "!"
-  , "%c"   % 3   == "!"
-  , "%c"   % 3.1 == "!"
-
-  -- not really error:
-  , "%s"   % 0    == "0"
-  , "%s"   % 3.14 == "3.14"
-  , "%2s"  % 0    == " 0"
-  , "%2s"  % 3.14 == "3.14"
-  ]
