Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(232)

Side by Side Diff: third_party/sqlite/src/test/enc3.test

Issue 901033002: Import SQLite 3.8.7.4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Chromium changes to support SQLite 3.8.7.4. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # 2002 May 24 1 # 2002 May 24
2 # 2 #
3 # The author disclaims copyright to this source code. In place of 3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing: 4 # a legal notice, here is a blessing:
5 # 5 #
6 # May you do good and not evil. 6 # May you do good and not evil.
7 # May you find forgiveness for yourself and forgive others. 7 # May you find forgiveness for yourself and forgive others.
8 # May you share freely, never taking more than you give. 8 # May you share freely, never taking more than you give.
9 # 9 #
10 #*********************************************************************** 10 #***********************************************************************
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 execsql { 74 execsql {
75 SELECT rowid FROM t2 WHERE a LIKE x'610062002500'; 75 SELECT rowid FROM t2 WHERE a LIKE x'610062002500';
76 } 76 }
77 } {1} 77 } {1}
78 } 78 }
79 79
80 # Try to attach a database with a different encoding. 80 # Try to attach a database with a different encoding.
81 # 81 #
82 ifcapable {utf16 && shared_cache} { 82 ifcapable {utf16 && shared_cache} {
83 db close 83 db close
84 file delete -force test8.db test8.db-journal 84 forcedelete test8.db test8.db-journal
85 set ::enable_shared_cache [sqlite3_enable_shared_cache 1] 85 set ::enable_shared_cache [sqlite3_enable_shared_cache 1]
86 sqlite3 dbaux test8.db 86 sqlite3 dbaux test8.db
87 sqlite3 db test.db 87 sqlite3 db test.db
88 db eval {SELECT 1 FROM sqlite_master LIMIT 1} 88 db eval {SELECT 1 FROM sqlite_master LIMIT 1}
89 do_test enc3-3.1 { 89 do_test enc3-3.1 {
90 dbaux eval { 90 dbaux eval {
91 PRAGMA encoding='utf8'; 91 PRAGMA encoding='utf8';
92 CREATE TABLE t1(x); 92 CREATE TABLE t1(x);
93 PRAGMA encoding 93 PRAGMA encoding
94 } 94 }
95 } {UTF-8} 95 } {UTF-8}
96 do_test enc3-3.2 { 96 do_test enc3-3.2 {
97 catchsql { 97 catchsql {
98 ATTACH 'test.db' AS utf16; 98 ATTACH 'test.db' AS utf16;
99 SELECT 1 FROM utf16.sqlite_master LIMIT 1; 99 SELECT 1 FROM utf16.sqlite_master LIMIT 1;
100 } dbaux 100 } dbaux
101 } {1 {attached databases must use the same text encoding as main database}} 101 } {1 {attached databases must use the same text encoding as main database}}
102 dbaux close 102 dbaux close
103 file delete -force test8.db test8.db-journal 103 forcedelete test8.db test8.db-journal
104 sqlite3_enable_shared_cache $::enable_shared_cache 104 sqlite3_enable_shared_cache $::enable_shared_cache
105 } 105 }
106 106
107 finish_test 107 finish_test
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698