Zipvfs

Documentation
Login

HOW TO RUN TESTS:

The sqlite3.c, zipvfs.c and tclzipvfs.c files must be compiled as a single
unit. Then linked against tclsqlite.c and various other files to create the
textfixture executable. Symbol SQLITE_ENABLE_ZIPVFS should be defined so
that tclsqlite.c initializes the zipvfs test interface.

One way to do this is to add the following to the Makefile just before 
the "include $(TOP)main.mk" line:

  OPTS += -DSQLITE_ENABLE_ZIPVFS
  ZIPVFS = /home/dan/src/zipvfs/zipvfs

  zipvfstest: sqlite3cdelete modfiles amalgamation-testfixture

  sqlite3cdelete:
          rm -f sqlite3.c

  modfiles: sqlite3cdelete sqlite3.c
          cat sqlite3.c >sqlite3.c2
          echo '#line 1 "$(ZIPVFS)/src/zipvfs.c"' >>sqlite3.c2
          cat $(ZIPVFS)/src/zipvfs.c >>sqlite3.c2
          echo '#ifdef SQLITE_TEST' >> sqlite3.c2
          echo '#line 1 "$(ZIPVFS)/src/tclzipvfs.c"' >>sqlite3.c2
          cat $(ZIPVFS)/src/tclzipvfs.c >>sqlite3.c2
          echo '#endif' >> sqlite3.c2
          mv sqlite3.c2 sqlite3.c
          cp $(ZIPVFS)/src/zipvfs.h .

To run the test scripts in the test/ directory, first set the
SQLITE_TEST_DIR environment variable to the full path of the SQLite source
distribution test/ directory. For example:

  $ export SQLITE_TEST_DIR=/home/dan/src/sqlite/sqlite/test 
  $ ./testfixture /home/dan/src/zipvfs/zipvfs/test/zipvfs.test



SUMMARY OF TEST FILE CONTENTS:

zipvfsA.test:
  Tests concerning the handling of the PENDING_BYTE page.

zipvfsB.test:
  Tests concerning sqlite3_create_vfs_v3() (autodetect callback).