diff options
author | Gustav Eek <gustav.eek@fripost.org> | 2019-06-27 21:03:23 +0200 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2019-06-27 21:20:31 +0200 |
commit | b62c567af680d569ee3c6393de77468dfc874288 (patch) | |
tree | 4dc33be6c963fb97c67f48b90013b46bf2843f3b | |
parent | 53ea6efb89aade69c921fc57ad809eb61e9133a8 (diff) |
test suite: import+dump before comparing SQLite dumps.
The dumping quoting style differ between sqlite versions. Compensate
with re-dumping also the reference file
-rw-r--r-- | tests/00-db-migration-0-to-1/run | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/00-db-migration-0-to-1/run b/tests/00-db-migration-0-to-1/run index e4eb770..757fe04 100644 --- a/tests/00-db-migration-0-to-1/run +++ b/tests/00-db-migration-0-to-1/run @@ -18,9 +18,16 @@ sqlite3 "$XDG_DATA_HOME/interimap/remote.db" >"$TMPDIR/dump.sql" <<-EOF .dump EOF +# re-import and dump the expected dump to work around SQLite format +# differences across versions +sqlite3 "$XDG_DATA_HOME/interimap/remote2.db" <"$TESTDIR/after.sql" +sqlite3 "$XDG_DATA_HOME/interimap/remote2.db" >"$TMPDIR/dump-expected.sql" <<-EOF + .dump +EOF + # XXX need 'user_version' PRAGMA in the dump for future migrations # http://sqlite.1065341.n5.nabble.com/dump-command-and-user-version-td101228.html diff -u --label="a/dump.sql" --label="b/dump.sql" \ - "$TESTDIR/after.sql" "$TMPDIR/dump.sql" + "$TMPDIR/dump-expected.sql" "$TMPDIR/dump.sql" # vim: set filetype=sh : |