summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/javascript/T23346.hs18
-rw-r--r--testsuite/tests/javascript/T23346.stdout1
-rw-r--r--testsuite/tests/javascript/all.T2
3 files changed, 21 insertions, 0 deletions
diff --git a/testsuite/tests/javascript/T23346.hs b/testsuite/tests/javascript/T23346.hs
new file mode 100644
index 0000000000..60fb2b8847
--- /dev/null
+++ b/testsuite/tests/javascript/T23346.hs
@@ -0,0 +1,18 @@
+{-# LANGUAGE CPP #-}
+
+module Main where
+
+main :: IO ()
+main = print (correct_host && correct_arch)
+
+#ifdef ghcjs_HOST_OS
+correct_host = True
+#else
+correct_host = False
+#endif
+
+#ifdef javascript_HOST_ARCH
+correct_arch = True
+#else
+correct_arch = False
+#endif
diff --git a/testsuite/tests/javascript/T23346.stdout b/testsuite/tests/javascript/T23346.stdout
new file mode 100644
index 0000000000..0ca95142bb
--- /dev/null
+++ b/testsuite/tests/javascript/T23346.stdout
@@ -0,0 +1 @@
+True
diff --git a/testsuite/tests/javascript/all.T b/testsuite/tests/javascript/all.T
index 3da7759da5..ff6b57a076 100644
--- a/testsuite/tests/javascript/all.T
+++ b/testsuite/tests/javascript/all.T
@@ -15,3 +15,5 @@ test('js-callback02', normal, compile_and_run, [''])
test('js-callback03', normal, compile_and_run, [''])
test('js-callback04', js_skip, compile_and_run, [''])
test('js-callback05', js_skip, compile_and_run, [''])
+
+test('T23346', normal, compile_and_run, [''])