From 27c991ba55f084389b4382884f95b6b8922f1aa3 Mon Sep 17 00:00:00 2001
From: Amirouche BOUBEKKI <amirouche@hypermove.net>
Date: Sat, 9 Jul 2016 20:19:13 +0200
Subject: [PATCH] add a failing test

---
 test/suite/test_bug016.py | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 test/suite/test_bug016.py

diff --git a/test/suite/test_bug016.py b/test/suite/test_bug016.py
new file mode 100644
index 0000000..40d4c04
--- /dev/null
+++ b/test/suite/test_bug016.py
@@ -0,0 +1,36 @@
+#!/usr/bin/env python
+import wiredtiger, wttest
+
+class test_bug016(wttest.WiredTigerTestCase):
+
+    def cursor_s(self, tablename, key):
+        cursor = self.session.open_cursor('table:' + tablename, None, None)
+        cursor.set_key(key)
+        return cursor
+
+    def cursor_ss(self, tablename, key, val):
+        cursor = self.cursor_s(tablename, key)
+        cursor.set_value(val)
+        return cursor
+
+    def test_without_column_names(self):
+        """Insert a row into a table without column names"""
+        self.session.create('table:base', 'key_format=r,value_format=S')
+        cursor = self.session.open_cursor('table:base', None, 'append')
+        cursor.set_value('base test')
+        cursor.insert()
+        self.assertEqual(cursor.get_key(), 1)
+        cursor.close()
+
+    def test_with_column_names(self):
+        """Insert a row into a table *with* column names"""
+        self.session.create('table:fail', 'key_format=r,value_format=S,columns=(key,value)')
+        cursor = self.session.open_cursor('table:fail', None, 'append')
+        cursor.set_value('failing test')
+        cursor.insert()
+        self.assertEqual(cursor.get_key(), 1)
+        cursor.close()
+
+
+if __name__ == '__main__':
+    wttest.run()
-- 
2.5.0

