diff --git a/tests/Makefile b/tests/Makefile
new file mode 100644
index 0000000000000000000000000000000000000000..6a0abcf1cf7f79f47ac3db01eec1eb9ff6ff7b45
--- /dev/null
+++ b/tests/Makefile
@@ -0,0 +1,7 @@
+# This Makefile runs the tests using GHC's testsuite framework.  It
+# assumes the package is part of a GHC build tree with the testsuite
+# installed in ../../../testsuite.
+
+TOP=../../../testsuite
+include $(TOP)/mk/boilerplate.mk
+include $(TOP)/mk/test.mk
diff --git a/tests/all.T b/tests/all.T
new file mode 100644
index 0000000000000000000000000000000000000000..b76a634aed90d4f371fbbb6449f897af3debb640
--- /dev/null
+++ b/tests/all.T
@@ -0,0 +1,5 @@
+# This is a test script for use with GHC's testsuite framework, see
+# http://darcs.haskell.org/testsuite
+
+test('datamap001', normal, compile_and_run, [''])
+
diff --git a/tests/datamap001.hs b/tests/datamap001.hs
new file mode 100644
index 0000000000000000000000000000000000000000..253690a4f83e7eeedc398b8f94e0cfaba9fd4384
--- /dev/null
+++ b/tests/datamap001.hs
@@ -0,0 +1,14 @@
+
+{-
+In the 6.6 era this printed [(5,"x")]; should be [(3,"b"),(5,"a")]
+-}
+
+module Main (main) where
+
+import Data.Map
+
+main :: IO ()
+main = do let m = fromList [(3,"b"),(5,"a")]
+              f k a = Just "x"
+              m' = updateAt f 1 m
+          print m'
diff --git a/tests/datamap001.stdout b/tests/datamap001.stdout
new file mode 100644
index 0000000000000000000000000000000000000000..3b2a864d4c9c4a48d0da18cf32bdb081c80735e1
--- /dev/null
+++ b/tests/datamap001.stdout
@@ -0,0 +1 @@
+fromList [(3,"b"),(5,"x")]