Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Pull request Compare This branch is 2311 commits behind postgis:svn-trunk.

Fetching latest commit…

Cannot retrieve the latest commit at this time

..
Failed to load latest commit information.
loader
Makefile.in
README
affine.sql
affine_expected
bestsrid.sql
bestsrid_expected
binary.sql
binary_expected
clean.sql
clean_expected
concave_hull.sql
concave_hull_expected
ctors.sql
ctors_expected
dump.sql
dump_expected
dumppoints.sql
dumppoints_expected
empty.sql
empty_expected
hausdorff.sql
hausdorff_expected
in_geojson.sql
in_geojson_expected
in_gml.sql
in_gml_expected
in_kml.sql
in_kml_expected
iscollection.sql
iscollection_expected
isvalid_test
isvaliddetail.sql
isvaliddetail_expected
legacy.sql
legacy_expected
long_xact.sql
long_xact_expected
lwgeom_regress.sql
lwgeom_regress_expected
measures.sql
measures_expected
node.sql
node_expected
offsetcurve.sql
offsetcurve_expected
out_geography.sql
out_geography_expected
out_geometry.sql
out_geometry_expected
polygonize.sql
polygonize_expected
polyhedralsurface.sql
polyhedralsurface_expected
postgis_type_name.sql
postgis_type_name_expected
regress.sql
regress_bdpoly.sql
regress_bdpoly_expected
regress_biginsert.sql
regress_buffer_params.sql
regress_buffer_params_expected
regress_expected
regress_index.sql
regress_index_expected
regress_index_nulls.sql
regress_index_nulls_expected
regress_lots_of_nulls.sql
regress_lots_of_points.sql
regress_lrs.sql
regress_lrs_expected
regress_management.sql
regress_management_expected
regress_ogc.sql
regress_ogc_cover.sql
regress_ogc_cover_expected
regress_ogc_expected
regress_ogc_prep.sql
regress_ogc_prep_expected
regress_proj.sql
regress_proj_expected
relate.sql
relate_bnr.sql
relate_bnr_expected
relate_expected
relatematch.sql
relatematch_expected
remove_repeated_points.sql
remove_repeated_points_expected
removepoint.sql
removepoint_expected
run_test
run_test.pl
setpoint.sql
setpoint_expected
sharedpaths.sql
sharedpaths_expected
simplify.sql
simplify_expected
snap.sql
snap_expected
snaptogrid.sql
snaptogrid_expected
split.sql
split_expected
sql-mm-circularstring.sql
sql-mm-circularstring_expected
sql-mm-compoundcurve.sql
sql-mm-compoundcurve_expected
sql-mm-curvepoly.sql
sql-mm-curvepoly_expected
sql-mm-general.sql
sql-mm-general_expected
sql-mm-multicurve.sql
sql-mm-multicurve_expected
sql-mm-multisurface.sql
sql-mm-multisurface_expected
sql-mm-serialize.sql
sql-mm-serialize_expected
summary.sql
summary_expected
test_index_concurrency
tickets.sql
tickets_expected
typmod.sql
typmod_expected
unaryunion.sql
unaryunion_expected
wkb.sql
wkb_expected
wkt.sql
wkt_expected
wmsservers.sql
wmsservers_expected

README

Requirements for run_test.pl
----------------------------

run_test.pl requires the following Perl modules to be installed

 Text::Diff;
 File::Which;
 File::Basename;
 File::Temp 'tempdir';
 File::Copy;
 File::Path 'make_path';
 File::Path 'remove_tree';
 Cwd 'abs_path';
 Getopt::Long;

Most distributions of Perl will have everything except Text::Diff and File::Which.
To install them from the command-line, as root run

 cpan Text::Diff
 cpan File::Which


How to add a regression test
----------------------------

1. Write a /regress/<testname>.sql file with data and sql queries for testing
2. Write a /regress/<testname>_expected or <testname>_expected.in file with 
   expected results per query
   The expected results provided in the <testname>_expected file must be 
   formatted using the following psql options:
      -a -- unaligned columns
      -f | -- use | (pipe) as the field separator between columns
      -t -- output rows only, ie. no table header

   cat file.sql | psql -F\| -t -A > file_expected

3. Edit regress/Makefile adding <testname> to the TESTS variable.
   Any _expected.in files need to be added to the PREPROC variable.

Optional:
   If your test has unusual setup or teardown requirements, you may create
   any of the following optional files (they will run in this order):
        /regress/<testname>-pre.sh
        /regress/<testname>-pre.sql   (run via psql)
                 (The test itself is run here.)
        /regress/<testname>-post.sql  (run via psql)
        /regress/<testname>-post.sh

Notes about changes in regression tests introduces with PostGIS 1.1.0
---------------------------------------------------------------------

- Mixed-dimensioned geometries are no longer supported
  (previous behaviour was to fill Z with a 0 value)
  [ updated to use new behaviour ]

- geometry_same operator (=~) now requires all dimensions equality
  Previously only x/y were checked

- geometry_same operator (=~) now requires geom type equality
  Previous behaviour:
     GEOMETRYCOLLECTION(POINT(0 1), POINT(2 3)) =~  MULTIPOINT(0 1,2 3)

- numb_sub_geometries does not exist anymore
  [updated to use numgeometries]

- truly_inside does not exist anymore
  [updated to use within]

Notes about <testname>_expected.in
----------------------------------

The first line of the <testname>_expected.in should include the postgis
configuration header.

  #include "../postgis_config.h"

The ability to run a c preprocessor over the expected results prior to 
regression testing was needed for testing curved string functionality that
would elicit different responses from JTS vs GEOS compilations.  Since
JTS is no longer supported, this may not be required anymore.


Something went wrong with that request. Please try again.