summaryrefslogtreecommitdiff
path: root/testsuite/tests/lib
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2012-02-03 23:35:11 +0000
committerIan Lynagh <igloo@earth.li>2012-02-03 23:35:11 +0000
commiteb2261cea9b8e3a834ca0c50f6a37b3fa1f3a36a (patch)
tree57741a48ad19a1c86d0b661fc2917e1792b8e383 /testsuite/tests/lib
parentc8755c9a0f40ed03989850b23bcaa3dcbae240da (diff)
downloadhaskell-eb2261cea9b8e3a834ca0c50f6a37b3fa1f3a36a.tar.gz
Move lib/Time tests into the old-time package
Diffstat (limited to 'testsuite/tests/lib')
-rw-r--r--testsuite/tests/lib/Time/Makefile3
-rw-r--r--testsuite/tests/lib/Time/T5430.hs14
-rw-r--r--testsuite/tests/lib/Time/T5430.stdout1
-rw-r--r--testsuite/tests/lib/Time/all.T4
-rw-r--r--testsuite/tests/lib/Time/time002.hs16
-rw-r--r--testsuite/tests/lib/Time/time002.stdout1
-rw-r--r--testsuite/tests/lib/Time/time003.hs24
-rw-r--r--testsuite/tests/lib/Time/time003.stdout2
-rw-r--r--testsuite/tests/lib/Time/time004.hs10
-rw-r--r--testsuite/tests/lib/Time/time004.stdout1
10 files changed, 0 insertions, 76 deletions
diff --git a/testsuite/tests/lib/Time/Makefile b/testsuite/tests/lib/Time/Makefile
deleted file mode 100644
index 9101fbd40a..0000000000
--- a/testsuite/tests/lib/Time/Makefile
+++ /dev/null
@@ -1,3 +0,0 @@
-TOP=../../..
-include $(TOP)/mk/boilerplate.mk
-include $(TOP)/mk/test.mk
diff --git a/testsuite/tests/lib/Time/T5430.hs b/testsuite/tests/lib/Time/T5430.hs
deleted file mode 100644
index 28353d80e3..0000000000
--- a/testsuite/tests/lib/Time/T5430.hs
+++ /dev/null
@@ -1,14 +0,0 @@
-
-import System.Locale
-import System.Time
-
-main :: IO ()
-main = do let clockTime = TOD 32400 0 -- 00:00:00 on 1 Jan 1970
- calTime <- toCalendarTime clockTime
- -- We check for 001 or 365 (timezone locale will determine which one)
- -- and output 001 for testing output consistently.
- putStrLn $ case (formatCalendarTime defaultTimeLocale "%j" calTime) of
- "001" -> "001" -- good!
- "365" -> "001" -- good!
- n -> n -- error!
-
diff --git a/testsuite/tests/lib/Time/T5430.stdout b/testsuite/tests/lib/Time/T5430.stdout
deleted file mode 100644
index 5325a8dff7..0000000000
--- a/testsuite/tests/lib/Time/T5430.stdout
+++ /dev/null
@@ -1 +0,0 @@
-001
diff --git a/testsuite/tests/lib/Time/all.T b/testsuite/tests/lib/Time/all.T
deleted file mode 100644
index 3b310b416e..0000000000
--- a/testsuite/tests/lib/Time/all.T
+++ /dev/null
@@ -1,4 +0,0 @@
-test('time002', normal, compile_and_run, [''])
-test('time003', normal, compile_and_run, [''])
-test('time004', normal, compile_and_run, [''])
-test('T5430', normal, compile_and_run, [''])
diff --git a/testsuite/tests/lib/Time/time002.hs b/testsuite/tests/lib/Time/time002.hs
deleted file mode 100644
index e2f9bcb7a7..0000000000
--- a/testsuite/tests/lib/Time/time002.hs
+++ /dev/null
@@ -1,16 +0,0 @@
-import System.Time
-
--- !!! check that we can read the current ClockTime, convert it
--- !!! to CalendarTime and back again, and that all three times when
--- !!! converted to strings compare equal.
-
-main = do
- t <- getClockTime
- let clock = show t
- c <- toCalendarTime t
- let cal = calendarTimeToString c
- let t2 = toClockTime c
- clock2 = show t2
- if (clock == cal && clock == clock2)
- then putStrLn "Ok."
- else putStrLn "Failed."
diff --git a/testsuite/tests/lib/Time/time002.stdout b/testsuite/tests/lib/Time/time002.stdout
deleted file mode 100644
index 587579af91..0000000000
--- a/testsuite/tests/lib/Time/time002.stdout
+++ /dev/null
@@ -1 +0,0 @@
-Ok.
diff --git a/testsuite/tests/lib/Time/time003.hs b/testsuite/tests/lib/Time/time003.hs
deleted file mode 100644
index 4dda0e466f..0000000000
--- a/testsuite/tests/lib/Time/time003.hs
+++ /dev/null
@@ -1,24 +0,0 @@
-import System.Time
-
-main :: IO ()
-main = do
- time <- getClockTime
- print (plausible (show time))
- let (CalendarTime year month mday hour min sec psec
- wday yday timezone gmtoff isdst) = toUTCTime time
- time2 = wdays !! fromEnum wday ++
- (' ' : months !! fromEnum month) ++
- (' ' : shows2 mday (' ' : shows2 hour (':' : shows2 min (':' : shows2 sec
- (' ' : timezone ++ ' ' : shows year "\n")))))
- print (plausible time2)
-
- where
- wdays = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]
- months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun",
- "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
- shows2 x = showString (pad2 x)
- pad2 x = case show x of
- c@[_] -> '0' : c
- cs -> cs
-
- plausible str = filter (== ':') str == "::" \ No newline at end of file
diff --git a/testsuite/tests/lib/Time/time003.stdout b/testsuite/tests/lib/Time/time003.stdout
deleted file mode 100644
index dbde422651..0000000000
--- a/testsuite/tests/lib/Time/time003.stdout
+++ /dev/null
@@ -1,2 +0,0 @@
-True
-True
diff --git a/testsuite/tests/lib/Time/time004.hs b/testsuite/tests/lib/Time/time004.hs
deleted file mode 100644
index 9a281a10da..0000000000
--- a/testsuite/tests/lib/Time/time004.hs
+++ /dev/null
@@ -1,10 +0,0 @@
-import System.Time
-
-main :: IO ()
-main = do
- time <- getClockTime
- let (CalendarTime year month mday hour min sec psec
- wday yday timezone gmtoff isdst) = toUTCTime time
- time' = toClockTime (CalendarTime (year - 1) month mday hour min sec psec
- wday yday timezone gmtoff isdst)
- print (length (show time) == length (show time'))
diff --git a/testsuite/tests/lib/Time/time004.stdout b/testsuite/tests/lib/Time/time004.stdout
deleted file mode 100644
index 0ca95142bb..0000000000
--- a/testsuite/tests/lib/Time/time004.stdout
+++ /dev/null
@@ -1 +0,0 @@
-True