From 651bb8cdb73439b033490b77e06499d33de6fab4 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Wed, 4 Jun 2014 10:40:18 +0200 Subject: [PATCH] Add instructions about adding a test --- test/README | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 test/README diff --git a/test/README b/test/README new file mode 100644 index 0000000..6dcf328 --- /dev/null +++ b/test/README @@ -0,0 +1,15 @@ +Adding tests consists in adding 2 files in this directory: one file +containing the sql code and another containing the expected output. + +Example, to add a test for CDB_Something function, you'd add: + + - CDB_SomethingTest.sql + - CDB_SomethingTest_expect + +To easy the generation of the expected file you can initially omit it, +then run "make -C .. installcheck" from the top-level dir and copy +../results/test/CDB_SomethingTest.out to CDB_SomethingTest_expect chopping +off the first line: + + make -C .. installcheck + tail -n +2 ../results/test/CDB_SomethingTest.out > CDB_SomethingTest_expect