Remove printf tests.

This commit is contained in:
Don Stewart 2005-05-15 05:14:06 +00:00
parent 57894600a0
commit c73f5f91c4
18 changed files with 0 additions and 194 deletions

View File

@ -1,37 +0,0 @@
import Printf
main = do printf "%d\n" $> (42::Int) ! []
printf "%u\n" $> (42::Int) ! []
printf "0%o\n" $> (42::Int) ! []
printf "0x%x\n" $> (42::Int) ! []
printf "0x%X\n" $> (42::Int) ! []
printf "%e\n" $> (42.1234 :: Double) ! []
printf "%E\n" $> (42.1234 :: Double) ! []
printf "%g\n" $> (42.1234 :: Double) ! []
printf "%G\n" $> (42.1234 :: Double) ! []
printf "%f\n" $> (42.1234 :: Double) ! []
printf "%c:%c:%c\n" $> 'a' ! 'b' ! 'c' ! []
printf "%s\n" $> "printf" ! []
printf "%+d\n" $> (42::Int) ! []
printf "%+0d\n" $> (42::Int) ! []
printf "%0+d\n" $> (42::Int) ! []
printf "%10d\n" $> (42::Int) ! []
printf "%-010d\n" $> (42::Int) ! []
printf "%-010.2d\n" $> (42::Int) ! []
printf "%+f\n" $> (42.1234 :: Double) ! []
printf "%+0f\n" $> (42.1234 :: Double) ! []
printf "%0+f\n" $> (42.1234 :: Double) ! []
printf "%10f\n" $> (42.1234 :: Double) ! []
printf "%-010f\n" $> (42.1234 :: Double) ! []
printf "%-010.2f\n" $> (42.1234 :: Double) ! []
printf "%10s\n" $> "printf" ! []
printf "%-10s\n" $> "printf" ! []
printf "%10.2s\n" $> "printf" ! []
printf "%2.10s\n" $> "printf" ! []
printf "%-2.10s\n" $> "printf" ! []
printf "%-10.2s\n" $> "printf" ! []

View File

@ -1,2 +0,0 @@
TOP=../../..
include ../../eval.mk

View File

@ -1,30 +0,0 @@
42
42
052
0x2a
0x2A
4.212340e1
4.212340E1
42.123400
42.123400
42.123400
a:b:c
printf
+42
+42
+42
42
42
42
+42.123400
+42.123400
+42.123400
42.123400
42.123400
42.12
printf
printf
pr
printf
printf
pr

View File

@ -1,36 +0,0 @@
#!/bin/sh
printf "%d\n" 42
printf "%u\n" 42
printf "0%o\n" 42
printf "0x%x\n" 42
printf "0x%X\n" 42
printf "%e\n" 42.1234
printf "%E\n" 42.1234
printf "%g\n" 42.1234
printf "%G\n" 42.1234
printf "%f\n" 42.1234
printf "%c:%c:%c\n" 'a' 'b' 'c'
printf "%s\n" "printf"
printf "%+d\n" 42
printf "%+0d\n" 42
printf "%0+d\n" 42
printf "%10d\n" 42
printf "%-010d\n" 42
printf "%-010.2d\n" 42
printf "%+f\n" 42.1234
printf "%+0f\n" 42.1234
printf "%0+f\n" 42.1234
printf "%10f\n" 42.1234
printf "%-010f\n" 42.1234
printf "%-010.2f\n" 42.1234
printf "%10s\n" "printf"
printf "%-10s\n" "printf"
printf "%10.2s\n" "printf"
printf "%2.10s\n" "printf"
printf "%-2.10s\n" "printf"
printf "%-10.2s\n" "printf"

View File

@ -1,13 +0,0 @@
import Printf
main = do
printf "%d\n" $> (42 :: Int) ! []
printf "0x%X\n" $> (42 :: Int) ! []
printf "%f\n" $> (42.1234 :: Double) ! []
printf "%c:%c:%c\n" $> 'a' ! 'b' ! 'c' ! []
printf "%s\n" $> "haskell" ! []
printf "%-010.4d\n" $> (42 :: Int) ! []
printf "%010.4f\n" $> (42.1234 :: Double) ! []
printf "%10.4s\n" $> (show (7 :: Int)) ! []
printf "%-10.4s\n" $> "haskell" ! []

View File

@ -1,2 +0,0 @@
TOP=../../..
include ../../eval.mk

View File

@ -1,9 +0,0 @@
42
0x2A
42.123400
a:b:c
haskell
42
00042.1234
7
hask

View File

@ -1,12 +0,0 @@
import Printf
import Control.Exception ( evaluate )
main = do
fn <- evaluate $! printf "%10.4f\n"
fn $> (10.0 :: Double) ! []
fn $> (-10.0 :: Double) ! []
fn $> (10.1010 :: Double) ! []
fn $> (0.0 :: Double) ! []
fn $> (0.987654321 :: Double) ! []
fn $> (987654321 :: Double) ! []
fn $> (-987654321 :: Double) ! []

View File

@ -1,2 +0,0 @@
TOP=../../..
include ../../eval.mk

View File

@ -1,7 +0,0 @@
10.0000
-10.0000
10.1010
0.0000
0.9877
987654321.0000
-987654321.0000

View File

@ -1,3 +0,0 @@
import Printf
main = printf "%x\n" $> "badstring" ! []

View File

@ -1,2 +0,0 @@
TOP=../../..
include ../../eval.mk

View File

@ -1,3 +0,0 @@
Fail: Type error in dynamic application.
Can't apply function <Int -> [Char]> to argument <[Char]>

View File

@ -1,2 +0,0 @@
a.out: Type error in dynamic application.
Can't apply function <Int -> [Char]> to argument <[Char]>

View File

@ -1,13 +0,0 @@
import Printf
main = do
printf "%d\n" $> (42 :: Int) ! []
printf "0x%X\n" $> (42 :: Int) ! []
printf "%f\n" $> (42.1234 :: Double) ! []
printf "%c:%c:%c\n" $> 'a' ! 'b' ! 'c' ! []
printf "%s\n" $> "haskell" ! []
printf "%-010.4d\n" $> (42 :: Int) ! []
printf "%010.4f\n" $> (42.1234 :: Double) ! []
printf "%10.4s\n" $> (7 :: Int)! []
printf "%-10.4s\n" $> "haskell" ! []

View File

@ -1,2 +0,0 @@
TOP=../../..
include ../../eval.mk

View File

@ -1,10 +0,0 @@
42
0x2A
42.123400
a:b:c
haskell
42
00042.1234
Fail: Type error in dynamic application.
Can't apply function <[Char] -> [Char]> to argument <Int>

View File

@ -1,9 +0,0 @@
42
0x2A
42.123400
a:b:c
haskell
42
00042.1234
a.out: Type error in dynamic application.
Can't apply function <[Char] -> [Char]> to argument <Int>