postgis/regress/loader/README

44 lines
1.7 KiB
Plaintext

A loader test requires, at a minimum, a dbf file:
<name>.dbf
Most tests will use a shapefile, so these files as well:
<name>.shp
<name>.shx
The loader will be run against the dbf/shapefile with no command-line flags,
then the output will be run via psql to insert the table into PostGIS.
If there is no <name>.opts file, the loader is then run with the -D flag,
and the output again run via psql.
See ../README for a description of optional setup/teardown script files.
The following are optional files for each loader test:
<name>.opts - If this exists, the first line that does not begin with a #
is read and passed as command line arguments to the loader. This
allows testing any arbitrary command line arguments (-s, -G, etc).
NOTE: When this file exists, this test is NOT run a second time
with -D, because -D can conflict with some arguments.
<name>.sql.expected - If this exists, the output of the loader is compared
with this file before running it via psql.
<name>.select.sql and
<name>.select.expected - If these are present, after the loader output is
loaded into the database, the query in <name>.select.sql is run and
the psql output is compared with <name>.select.expected.
<name>.select.sql and
<name>-w.select.expected - If these are present, the loader is also run with
the -w flag to produce WKT output rather than WKB output. The query
in <name>.select.sql is run again and compared against
<name>-w.select.expected.
<name>.shp.expected - If this is present, the dumper is run (after running
the WKB version, not the WKT version, as WKT can lose precision)
and the .shp file produced by the dumper is compared with
<name>.shp.expected.