Skip to content

Commit

Permalink
quick test updates for Android 9 (Pie)
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher J. Brody committed Aug 18, 2019
1 parent cff3f97 commit cd8f59d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions spec/www/spec/db-tx-error-mapping-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,8 @@ var mytests = function() {
else if (isAndroid && !isImpl2)
expect(error.message).toMatch(/sqlite3_prepare_v2 failure:.*incomplete input/);
else if (isAndroid && isImpl2)
expect(error.message).toMatch(/near \"VALUES\": syntax error.*code 1.*while compiling: INSERT INTO test_table/);
// TBD more general pattern for Android 9 vs ...
expect(error.message).toMatch(/code 1.*while compiling: INSERT INTO test_table/);
else
expect(error.message).toMatch(/incomplete input/);

Expand Down Expand Up @@ -321,7 +322,8 @@ var mytests = function() {
else if (isWindows)
expect(error.message).toMatch(/error callback did not return false.*Error preparing an SQLite statement/);
else if (isAndroid && isImpl2)
expect(error.message).toMatch(/error callback did not return false.*syntax error/);
// TBD more general pattern for Android 9 vs ...
expect(error.message).toMatch(/error callback did not return false.*code 1/);
else
expect(error.message).toMatch(/error callback did not return false.*incomplete input/);

Expand Down
2 changes: 1 addition & 1 deletion spec/www/spec/db-tx-string-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ var mytests = function() {
(!isWebSql && isWindows) ||
(!isWebSql && !isWindows && isAndroid && isImpl2 &&
!(/Android 4/.test(navigator.userAgent)) &&
!(/Android 8/.test(navigator.userAgent))))
!(/Android [8-9]/.test(navigator.userAgent))))
expect(rs.rows.item(0).uppertext).toBe('A');
else
expect(rs.rows.item(0).uppertext).toBe('A\0CD');
Expand Down
1 change: 1 addition & 0 deletions spec/www/spec/sqlite-version-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ var mytests = function() {
// DIFFERENT for builtin android.database implementation:
if (!isWindows && isAndroid && isImpl2)
expect(rs.rows.item(0).journal_mode).toBe(
(/Android 9/.test(navigator.userAgent)) ? 'wal' :
(/Android 8.1.99/.test(navigator.userAgent)) ? 'wal' :
(/Android 8/.test(navigator.userAgent)) ? 'truncate' :
'persist');
Expand Down

0 comments on commit cd8f59d

Please sign in to comment.