summaryrefslogtreecommitdiff
path: root/psql/tests
diff options
context:
space:
mode:
Diffstat (limited to 'psql/tests')
-rw-r--r--psql/tests/.gitignore4
-rw-r--r--psql/tests/build/.gitignore3
-rw-r--r--psql/tests/build/bootstrap.build8
-rw-r--r--psql/tests/build/root.build15
-rw-r--r--psql/tests/buildfile4
-rw-r--r--psql/tests/help.testscript12
-rw-r--r--psql/tests/version.testscript8
7 files changed, 54 insertions, 0 deletions
diff --git a/psql/tests/.gitignore b/psql/tests/.gitignore
new file mode 100644
index 0000000..ce6eed8
--- /dev/null
+++ b/psql/tests/.gitignore
@@ -0,0 +1,4 @@
+# Testscript output directories (can be symlinks).
+#
+test
+test-*
diff --git a/psql/tests/build/.gitignore b/psql/tests/build/.gitignore
new file mode 100644
index 0000000..4a730a3
--- /dev/null
+++ b/psql/tests/build/.gitignore
@@ -0,0 +1,3 @@
+config.build
+root/
+bootstrap/
diff --git a/psql/tests/build/bootstrap.build b/psql/tests/build/bootstrap.build
new file mode 100644
index 0000000..092a76b
--- /dev/null
+++ b/psql/tests/build/bootstrap.build
@@ -0,0 +1,8 @@
+# file : tests/build/bootstrap.build
+# license : PostgreSQL License; see accompanying COPYRIGHT file
+
+project = # Unnamed tests subproject.
+
+using config
+using test
+using dist
diff --git a/psql/tests/build/root.build b/psql/tests/build/root.build
new file mode 100644
index 0000000..4c0e7c3
--- /dev/null
+++ b/psql/tests/build/root.build
@@ -0,0 +1,15 @@
+# file : tests/build/root.build
+# license : PostgreSQL License; see accompanying COPYRIGHT file
+
+# We need to configure C module to obtain the target information (see below).
+#
+using c.config
+
+# Setup the psql program that we are testing.
+#
+import psql = psql%exe{psql}
+testscript{*}: test = $psql
+
+# Specify the test target for cross-testing.
+#
+test.target = $c.target
diff --git a/psql/tests/buildfile b/psql/tests/buildfile
new file mode 100644
index 0000000..78b6dd7
--- /dev/null
+++ b/psql/tests/buildfile
@@ -0,0 +1,4 @@
+# file : tests/buildfile
+# license : PostgreSQL License; see accompanying COPYRIGHT file
+
+./: testscript{*} $psql
diff --git a/psql/tests/help.testscript b/psql/tests/help.testscript
new file mode 100644
index 0000000..165eb35
--- /dev/null
+++ b/psql/tests/help.testscript
@@ -0,0 +1,12 @@
+# file : tests/help.testscript
+# license : PostgreSQL License; see accompanying COPYRIGHT file
+
+: basics
+:
+: Test that stdout contains at least one non-empty line.
+:
+$* --help >>~%EOO%
+ %.*
+ %.+%
+ %.*
+ EOO
diff --git a/psql/tests/version.testscript b/psql/tests/version.testscript
new file mode 100644
index 0000000..cfeea80
--- /dev/null
+++ b/psql/tests/version.testscript
@@ -0,0 +1,8 @@
+# file : tests/version.testscript
+# license : PostgreSQL License; see accompanying COPYRIGHT file
+
+: basics
+:
+$* --version >>~%EOO%
+ %.+PostgreSQL.+%
+ EOO