diff options
Diffstat (limited to 'testsuite/tests/runghc')
-rw-r--r-- | testsuite/tests/runghc/T6132.hs | 15 | ||||
-rw-r--r-- | testsuite/tests/runghc/all.T | 2 |
2 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/tests/runghc/T6132.hs b/testsuite/tests/runghc/T6132.hs new file mode 100644 index 0000000000..dbb996b141 --- /dev/null +++ b/testsuite/tests/runghc/T6132.hs @@ -0,0 +1,15 @@ +#!/usr/bin/env whatever + +{-# LANGUAGE CPP #-} + +module Main where + +-- Compiling a program with CPP that also has a hash bang should work (#6132). +-- Before ghc-7.8, it failed with: +-- +-- error: invalid preprocessing directive #! +-- #!/usr/bin/env runghc + +#if 1 +main = return () +#endif diff --git a/testsuite/tests/runghc/all.T b/testsuite/tests/runghc/all.T index 0403fbcf68..7c4fad251f 100644 --- a/testsuite/tests/runghc/all.T +++ b/testsuite/tests/runghc/all.T @@ -6,3 +6,5 @@ test('T8601', req_interp, run_command, test('T11247', [req_interp, expect_broken(11247)], run_command, ['$MAKE --no-print-directory -s T11247']) + +test('T6132', [], compile, ['']) |