mirror of
https://github.com/aljazceru/turso.git
synced 2026-02-23 08:55:40 +01:00
Correct Rtrim
This commit is contained in:
@@ -48,6 +48,6 @@ impl CollationSeq {
|
||||
}
|
||||
|
||||
fn rtrim_cmp(lhs: &str, rhs: &str) -> Ordering {
|
||||
lhs.trim().cmp(rhs.trim())
|
||||
lhs.trim_end().cmp(rhs.trim_end())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,13 +18,21 @@ do_execsql_test collate-binary-2 {
|
||||
} {1}
|
||||
|
||||
do_execsql_test collate-rtrim-1 {
|
||||
SELECT 'hat' == ' hAt ' COLLATE RTRIM;
|
||||
SELECT 'hat' == 'hAt ' COLLATE RTRIM;
|
||||
} {0}
|
||||
|
||||
do_execsql_test collate-rtrim-2 {
|
||||
SELECT 'hat' == ' hat ' COLLATE RTRIM;
|
||||
SELECT 'hat' == 'hat ' COLLATE RTRIM;
|
||||
} {1}
|
||||
|
||||
do_execsql_test collate-rtrim-3 {
|
||||
SELECT 'hat' == ' hAt ' COLLATE RTRIM;
|
||||
} {0}
|
||||
|
||||
do_execsql_test collate-rtrim-4 {
|
||||
SELECT 'hat' == ' hat ' COLLATE RTRIM;
|
||||
} {0}
|
||||
|
||||
do_execsql_test collate-left-precedence {
|
||||
SELECT 'hat' COLLATE BINARY == 'hAt' COLLATE NOCASE;
|
||||
} {0}
|
||||
|
||||
Reference in New Issue
Block a user