[add some more useful regression tests
John Meacham <john@repetae.net>**20090221144638
 Ignore-this: ab4aac926aa9c626c7d1f2e254fbcea5
] addfile ./regress/tests/2_language/Bounds.expected.stdout
addfile ./regress/tests/2_language/Bounds.hs
addfile ./regress/tests/2_language/CPP.expected.stdout
addfile ./regress/tests/2_language/CPP.hs
addfile ./regress/tests/2_language/IrrefutableLambda.expected.stdout
hunk ./regress/regress.prl 26
+my $verbose;
hunk ./regress/regress.prl 39
+    v => \$verbose,
hunk ./regress/regress.prl 46
-=head1 NAME
-
-regress
-
-=head1 SYNOPSIS
-
-regress [options] [conditions]
-
- Conditions:
-   <regex>       only run tests mathing regex
-   !<regex>      don't run tests matching regex
-
- Options:
-   --help        brief help message
-   --man         full documentation
-
-   -m ARCH       passed through to LHC
-   -f FLAG       passed through to LHC
-   -o OPTION     pass given option to LHC
-   -t INT        timeout in seconds of CPU time
-
-   -l            use base package (.hl file) rather than just pulling
-                 in the .ho files from lib/base/dist/build/
-   -n            go faster by not linting
-   -p            profile LHC (requires lhcp to have been built)
-
-   --rts         extra GHC RTS flags for LHC
-   --clean       build .ho files for tests from scratch
- 
-=head1 DESCRIPTION
-
-Run the LHC test suite.
-
-=cut
hunk ./regress/regress.prl 125
+sub frlog {
+    my $msg = join "",@_;
+    chomp $msg;
+    print RLOG $msg, "\n";
+    print $msg, "\n" if $verbose;
+}
+
hunk ./regress/regress.prl 134
-    rlog "; ", join " ",@_;
+    frlog "; ", join " ",@_;
hunk ./regress/regress.prl 140
+my @libs = $opt_l ? () : ("--noauto", "-i$jhc_dir/lib/base","-i$jhc_dir/lib/haskell98");
+my @fast = $opt_n ? ("-fno-lint") : ("-flint");
hunk ./regress/regress.prl 148
-    test: foreach my $fn (sort(split /\n/,`ls $cwd`)) {
+    opendir my $dh,$cwd or die "$!: could not read $cwd";
+    test: foreach my $fn (sort readdir $dh) {
+        next unless $fn =~ /^\w/;
hunk ./regress/regress.prl 177
-            rlog "-- $name";
-            my @libs = $opt_l ? () : ("--noauto", "-i$jhc_dir/lib/base","-i$jhc_dir/lib/haskell98");
-            my @fast = $opt_n ? ("-fno-lint") : ("-flint");
+            rlog "---- $name";
hunk ./regress/regress.prl 216
+    closedir $dh;
hunk ./regress/regress.prl 255
+__END__
+
+=head1 NAME
+
+regress
hunk ./regress/regress.prl 261
+=head1 SYNOPSIS
hunk ./regress/regress.prl 263
+regress [options] [conditions]
+
+ Conditions:
+   <regex>       only run tests mathing regex
+   !<regex>      don't run tests matching regex
+
+ Options:
+   --help        brief help message
+   --man         full documentation
+
+   -m ARCH       passed through to JHC
+   -f FLAG       passed through to JHC
+   -o OPTION     pass given option to JHC
+   -t INT        timeout in seconds of CPU time
+
+   -l            use base package (.hl file) rather than just pulling
+                 in the .ho files from lib/base/dist/build/
+   -n            go faster by not linting
+   -p            profile JHC (requires jhcp to have been built)
+
+   --rts         extra GHC RTS flags for JHC
+   --clean       build .ho files for tests from scratch
+
+=head1 DESCRIPTION
+
+Run the JHC test suite.
+
+=cut
hunk ./regress/tests/2_language/Bounds.expected.stdout 1
+-128
+127
+-32768
+32767
+-2147483648
+2147483647
+-9223372036854775808
+9223372036854775807
hunk ./regress/tests/2_language/Bounds.hs 1
+module Main where
+
+import Data.Int
+
+main :: IO ()
+main = do print (minBound :: Int8)
+          print (maxBound :: Int8)
+          print (minBound :: Int16)
+          print (maxBound :: Int16)
+          print (minBound :: Int32)
+          print (maxBound :: Int32)
+          print (minBound :: Int64)
+          print (maxBound :: Int64)
hunk ./regress/tests/2_language/CPP.expected.stdout 1
+in Jhc
hunk ./regress/tests/2_language/CPP.hs 1
+{-# OPTIONS_JHC -fcpp #-}
+
+#ifdef __JHC__
+main = putStrLn "in Jhc"
+#else
+main = putStrLn "not in Jhc"
+#endif
hunk ./regress/tests/2_language/IrrefutableLambda.expected.stdout 1
+Hi!