Repository : ssh://darcs.haskell.org//srv/darcs/packages/base On branch : master
http://hackage.haskell.org/trac/ghc/changeset/15e1a1679abce99a3c74f8591ce046daca916a16 >--------------------------------------------------------------- commit 15e1a1679abce99a3c74f8591ce046daca916a16 Author: Ian Lynagh <[email protected]> Date: Fri Feb 3 23:29:57 2012 +0000 Move Text.Printf tests from testsuite; part of #1161 >--------------------------------------------------------------- tests/Text.Printf/1548.hs | 11 +++++++++++ tests/Text.Printf/1548.stdout | 3 +++ tests/{Numeric => Text.Printf}/Makefile | 0 tests/Text.Printf/all.T | 1 + 4 files changed, 15 insertions(+), 0 deletions(-) diff --git a/tests/Text.Printf/1548.hs b/tests/Text.Printf/1548.hs new file mode 100644 index 0000000..68cec05 --- /dev/null +++ b/tests/Text.Printf/1548.hs @@ -0,0 +1,11 @@ +import Text.Printf + +main = do + printf "%.*f\n" (2::Int) ((1/3) :: Double) + -- (expected: "0.33") + + printf "%.3s\n" "foobar" + -- (expected: "foo") + + printf "%10.5d\n" (4::Int) + -- (expected: " 00004") diff --git a/tests/Text.Printf/1548.stdout b/tests/Text.Printf/1548.stdout new file mode 100644 index 0000000..4976334 --- /dev/null +++ b/tests/Text.Printf/1548.stdout @@ -0,0 +1,3 @@ +0.33 +foo + 00004 diff --git a/tests/Numeric/Makefile b/tests/Text.Printf/Makefile similarity index 100% copy from tests/Numeric/Makefile copy to tests/Text.Printf/Makefile diff --git a/tests/Text.Printf/all.T b/tests/Text.Printf/all.T new file mode 100644 index 0000000..aa26ff2 --- /dev/null +++ b/tests/Text.Printf/all.T @@ -0,0 +1 @@ +test('1548', normal, compile_and_run, ['']) _______________________________________________ Cvs-libraries mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-libraries
