SQLite

Check-in [51452d20f9]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Additional test cases for the RTRIM collation. (CVS 4735)
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 51452d20f99ecbe0fdb73cfafde5270711aeacad
User & Date: drh 2008-01-21 16:47:16.000
Context
2008-01-22
01:48
Changes to lemon to generate additional comments in the output file and to remove unreachable code. Additional test cases for improved test coverage. (CVS 4736) (check-in: 2a0bc1e186 user: drh tags: trunk)
2008-01-21
16:47
Additional test cases for the RTRIM collation. (CVS 4735) (check-in: 51452d20f9 user: drh tags: trunk)
16:22
Miscellaneous test coverage improvements. (CVS 4734) (check-in: 720bc20a11 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to test/collateA.test.
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#    May you share freely, never taking more than you give.
#
#***********************************************************************
# This file implements regression tests for SQLite library.  The
# focus of this script is the built-in RTRIM collating
# API.
#
# $Id: collateA.test,v 1.1 2008/01/20 23:19:58 drh Exp $

set testdir [file dirname $argv0]
source $testdir/tester.tcl

do_test collateA-1.1 {
  execsql {
    CREATE TABLE t1(







|







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#    May you share freely, never taking more than you give.
#
#***********************************************************************
# This file implements regression tests for SQLite library.  The
# focus of this script is the built-in RTRIM collating
# API.
#
# $Id: collateA.test,v 1.2 2008/01/21 16:47:16 drh Exp $

set testdir [file dirname $argv0]
source $testdir/tester.tcl

do_test collateA-1.1 {
  execsql {
    CREATE TABLE t1(
61
62
63
64
65
66
67













68
69
70
71
72
73
74
} {2 3 4}
do_test collateA-1.11 {
  execsql {SELECT 'abc123'='abc123                         ' COLLATE RTRIM;}
} {1}
do_test collateA-1.12 {
  execsql {SELECT 'abc123                         '='abc123' COLLATE RTRIM;}
} {1}














do_test collateA-2.1 {
  execsql {
    CREATE INDEX i1b ON t1(b);
    CREATE INDEX i1c ON t1(c);
    PRAGMA integrity_check;
  }







>
>
>
>
>
>
>
>
>
>
>
>
>







61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
} {2 3 4}
do_test collateA-1.11 {
  execsql {SELECT 'abc123'='abc123                         ' COLLATE RTRIM;}
} {1}
do_test collateA-1.12 {
  execsql {SELECT 'abc123                         '='abc123' COLLATE RTRIM;}
} {1}
do_test collateA-1.13 {
  execsql {SELECT '  '='' COLLATE RTRIM, '  '='' COLLATE BINARY, '  '=''}
} {1 0 0}
do_test collateA-1.14 {
  execsql {SELECT ''='  ' COLLATE RTRIM, ''='  ' COLLATE BINARY, ''='  '}
} {1 0 0}
do_test collateA-1.15 {
  execsql {SELECT '  '='      ' COLLATE RTRIM, '  '='        '}
} {1 0}
do_test collateA-1.16 {
  execsql {SELECT ''<>'  ' COLLATE RTRIM, ''<>'  ' COLLATE BINARY, ''<>'  '}
} {0 1 1}


do_test collateA-2.1 {
  execsql {
    CREATE INDEX i1b ON t1(b);
    CREATE INDEX i1c ON t1(c);
    PRAGMA integrity_check;
  }