From 8b29980edbd2483c3a15f18cfc79788008ab5211 Mon Sep 17 00:00:00 2001 From: Henning Guenther Date: Sat, 19 Jan 2008 15:30:58 -0800 Subject: [PATCH] ASCII test cases darcs-hash:20080119233058-a4fee-e903ea97491b95c8278d925553b50589a906a7cd --- Test/Tests.hs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Test/Tests.hs b/Test/Tests.hs index 380c4d3..d6ebe3a 100644 --- a/Test/Tests.hs +++ b/Test/Tests.hs @@ -1,10 +1,21 @@ module Test.Tests where import Data.Encoding +import Data.Encoding.ASCII import Data.Encoding.UTF8 import Test.Tester import Test.HUnit +asciiTests :: Test +asciiTests = TestList $ map test $ + [EncodingTest ASCII + "Hello, world!" + [0x48,0x65,0x6C,0x6C,0x6F,0x2C,0x20,0x77,0x6F,0x72,0x6C,0x64,0x21] + ,EncodingError ASCII + "\x0041\x2262\x0391\x002E" + (HasNoRepresentation '\x2262') + ] + utf8Tests :: Test utf8Tests = TestList $ map test $ -- Simple encoding tests