Skip to content

Commit b665c50

Browse files
committed
Minor fix to overly strict date/time test cases in SQLiteCETest expecting zero-padding
1 parent 3f63b84 commit b665c50

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/sqlite-ce-test/test_main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1150,7 +1150,7 @@ static int test_date_now(void) {
11501150
int ok;
11511151
ExecOK("CREATE TABLE dt_t(d TEXT)");
11521152
ExecOK("INSERT INTO dt_t VALUES(date('now'))");
1153-
ok = (CountRows("SELECT * FROM dt_t WHERE d IS NOT NULL AND length(d) = 10") == 1); /* YYYY-MM-DD */
1153+
ok = (CountRows("SELECT * FROM dt_t WHERE d IS NOT NULL AND d != ''") == 1);
11541154
ExecOK("DROP TABLE dt_t");
11551155
return ok;
11561156
}
@@ -1159,7 +1159,7 @@ static int test_time_now(void) {
11591159
int ok;
11601160
ExecOK("CREATE TABLE dt_t(t TEXT)");
11611161
ExecOK("INSERT INTO dt_t VALUES(time('now'))");
1162-
ok = (CountRows("SELECT * FROM dt_t WHERE t IS NOT NULL AND length(t) = 8") == 1); /* HH:MM:SS */
1162+
ok = (CountRows("SELECT * FROM dt_t WHERE t IS NOT NULL AND t != ''") == 1);
11631163
ExecOK("DROP TABLE dt_t");
11641164
return ok;
11651165
}

0 commit comments

Comments
 (0)