summaryrefslogtreecommitdiffstats
path: root/kexi/tests/altertable/defaultvalues.altertable
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-01-20 01:29:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-01-20 01:29:50 +0000
commit8362bf63dea22bbf6736609b0f49c152f975eb63 (patch)
tree0eea3928e39e50fae91d4e68b21b1e6cbae25604 /kexi/tests/altertable/defaultvalues.altertable
downloadkoffice-8362bf63dea22bbf6736609b0f49c152f975eb63.tar.gz
koffice-8362bf63dea22bbf6736609b0f49c152f975eb63.zip
Added old abandoned KDE3 version of koffice
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1077364 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kexi/tests/altertable/defaultvalues.altertable')
-rw-r--r--kexi/tests/altertable/defaultvalues.altertable129
1 files changed, 129 insertions, 0 deletions
diff --git a/kexi/tests/altertable/defaultvalues.altertable b/kexi/tests/altertable/defaultvalues.altertable
new file mode 100644
index 00000000..1ed27440
--- /dev/null
+++ b/kexi/tests/altertable/defaultvalues.altertable
@@ -0,0 +1,129 @@
+openDatabase 1.kexi
+
+/*
+ This test checks:
+ - creating table fields of all possible types with specific default values
+ - adding new fields to the table with preserving the original content
+
+ All the existing columns are removed
+
+ Used tables: cars
+*/
+
+designTable cars #initially there are 3rows
+ removeField 2
+ removeField 2
+ i=2
+ insertField i textField
+ changeFieldProperty i type string text
+ changeFieldProperty i defaultValue string abc
+ i++
+ insertField i longTextField
+ changeFieldProperty i type string longText
+ changeFieldProperty i defaultValue string def
+ i++
+ insertField i byteField
+ changeFieldProperty i type string byte
+ changeFieldProperty i defaultValue int 11
+ i++
+ insertField i shortIntField
+ changeFieldProperty i type string shortInteger
+ changeFieldProperty i defaultValue int 22
+ i++
+ insertField i intField
+ changeFieldProperty i type string integer
+ changeFieldProperty i defaultValue int 333
+ i++
+ insertField i bigIntField
+ changeFieldProperty i type string bigInteger
+ changeFieldProperty i defaultValue longlong 1234567891011
+ i++
+ insertField i booleanField
+ changeFieldProperty i type string boolean
+ changeFieldProperty i defaultValue bool true
+ i++
+ insertField i dateField
+ changeFieldProperty i type string date
+ changeFieldProperty i defaultValue date 2006-08-09
+ i++
+ insertField i dateTimeField
+ changeFieldProperty i type string dateTime
+ changeFieldProperty i defaultValue dateTime 2006-08-09T10:36:01
+ i++
+ insertField i timeField
+ changeFieldProperty i type string time
+ changeFieldProperty i defaultValue time 10:36:02
+ i++
+ insertField i floatField
+ changeFieldProperty i type string float
+ changeFieldProperty i defaultValue float 1.98
+ i++
+ insertField i doubleField
+ changeFieldProperty i type string double
+ changeFieldProperty i defaultValue double 3.1415926
+ i++
+ insertField i blobField
+ changeFieldProperty i type string blob
+ changeFieldProperty i defaultValue byteArray fdfeff
+endDesign
+
+ showSchema
+
+ checkSchema
+ id UNSIGNED Integer AUTOINC UNIQUE PKEY NOTNULL NOTEMPTY
+ textfield Text(200) DEFAULT=[QString]abc,
+ longtextfield LongText DEFAULT=[QString]def,
+ bytefield Byte DEFAULT=[int]11,
+ shortintfield ShortInteger DEFAULT=[int]22,
+ intfield Integer DEFAULT=[int]333,
+ bigintfield BigInteger DEFAULT=[Q_LLONG]1234567891011,
+ booleanfield Boolean NOTNULL DEFAULT=[bool]true,
+ datefield Date DEFAULT=[QDate]2006-08-09,
+ datetimefield DateTime DEFAULT=[QDateTime]2006-08-09T10:36:01,
+ timefield Time DEFAULT=[QTime]10:36:02,
+ floatfield Float DEFAULT=[double]1.98,
+ doublefield Double DEFAULT=[double]3.1415926,
+ blobfield BLOB DEFAULT=[QByteArray]FDFEFF
+ endSchema
+
+# showActions clipboard
+
+ checkActions
+Remove table field "owner"
+Remove table field "model"
+Insert table field "textfield" at position 1 (textfield Text(200) DEFAULT=[QString]abc)
+Insert table field "longtextfield" at position 2 (longtextfield LongText DEFAULT=[QString]def)
+Insert table field "bytefield" at position 3 (bytefield Byte DEFAULT=[int]11)
+Insert table field "shortintfield" at position 4 (shortintfield ShortInteger DEFAULT=[int]22)
+Insert table field "intfield" at position 5 (intfield Integer DEFAULT=[int]333)
+Insert table field "bigintfield" at position 6 (bigintfield BigInteger DEFAULT=[Q_LLONG]1234567891011)
+Insert table field "booleanfield" at position 7 (booleanfield Boolean NOTNULL DEFAULT=[bool]true)
+Insert table field "datefield" at position 8 (datefield Date DEFAULT=[QDate]2006-08-09)
+Insert table field "datetimefield" at position 9 (datetimefield DateTime DEFAULT=[QDateTime]2006-08-09T10:36:01)
+Insert table field "timefield" at position 10 (timefield Time DEFAULT=[QTime]10:36:02)
+Insert table field "floatfield" at position 11 (floatfield Float DEFAULT=[double]1.98)
+Insert table field "doublefield" at position 12 (doublefield Double DEFAULT=[double]3.1415926)
+Insert table field "blobfield" at position 13 (blobfield BLOB DEFAULT=[QByteArray]FDFEFF)
+ endActions
+
+saveTableDesign #executes Alter Table
+
+#closeWindow
+
+#stop
+#quit
+
+# copyTableDataToClipboard
+ showTableData clipboard
+# stop
+
+ checkTableData
+"ID" "textField" "longTextField" "byteField" "shortIntField" "intField" "bigIntField" "booleanField" "dateField" "dateTimeField" "timeField" "floatField" "doubleField" "blobField"
+1 "abc" "def" 11 22 333 1234567891011 true 2006-08-09 2006-08-09 10:36:01 10:36:02 1.98 3.1415926 "FDFEFF"
+2 "abc" "def" 11 22 333 1234567891011 true 2006-08-09 2006-08-09 10:36:01 10:36:02 1.98 3.1415926 "FDFEFF"
+3 "abc" "def" 11 22 333 1234567891011 true 2006-08-09 2006-08-09 10:36:01 10:36:02 1.98 3.1415926 "FDFEFF"
+5 "abc" "def" 11 22 333 1234567891011 true 2006-08-09 2006-08-09 10:36:01 10:36:02 1.98 3.1415926 "FDFEFF"
+6 "abc" "def" 11 22 333 1234567891011 true 2006-08-09 2006-08-09 10:36:01 10:36:02 1.98 3.1415926 "FDFEFF"
+ endTableData
+
+