[commit: testsuite] master: Add test for #5963 (8bbcee0)

Paolo Capriotti p.capriotti at gmail.com
Wed Jun 20 18:22:16 CEST 2012


Repository : ssh://darcs.haskell.org//srv/darcs/testsuite

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/8bbcee0f96514766c9fb31ec25ac3a71351d9754

>---------------------------------------------------------------

commit 8bbcee0f96514766c9fb31ec25ac3a71351d9754
Author: Paolo Capriotti <p.capriotti at gmail.com>
Date:   Wed Jun 20 17:19:25 2012 +0100

    Add test for #5963

>---------------------------------------------------------------

 tests/numeric/should_run/T5863.hs     |    6 ++++++
 tests/numeric/should_run/T5863.stdout |    2 ++
 tests/numeric/should_run/all.T        |    1 +
 3 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/tests/numeric/should_run/T5863.hs b/tests/numeric/should_run/T5863.hs
new file mode 100644
index 0000000..7caa7f5
--- /dev/null
+++ b/tests/numeric/should_run/T5863.hs
@@ -0,0 +1,6 @@
+import Text.Printf
+
+main :: IO ()
+main = do
+  putStrLn $ printf "%.1f" (0.45 :: Double)
+  putStrLn $ printf "%.1f" (0.55 :: Double)
diff --git a/tests/numeric/should_run/T5863.stdout b/tests/numeric/should_run/T5863.stdout
new file mode 100644
index 0000000..309bc15
--- /dev/null
+++ b/tests/numeric/should_run/T5863.stdout
@@ -0,0 +1,2 @@
+0.4
+0.6
diff --git a/tests/numeric/should_run/all.T b/tests/numeric/should_run/all.T
index 5066655..3e12a88 100644
--- a/tests/numeric/should_run/all.T
+++ b/tests/numeric/should_run/all.T
@@ -57,4 +57,5 @@ test('4383', normal, compile_and_run, [''])
 test('add2', normal, compile_and_run, ['-fobject-code'])
 test('mul2', normal, compile_and_run, ['-fobject-code'])
 test('quotRem2', normal, compile_and_run, ['-fobject-code'])
+test('T5863', normal, compile_and_run, [''])
 





More information about the Cvs-ghc mailing list