aboutsummaryrefslogtreecommitdiff
path: root/vo/votest/tests/req_4.5.cl
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
commitfa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch)
treebdda434976bc09c864f2e4fa6f16ba1952b1e555 /vo/votest/tests/req_4.5.cl
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'vo/votest/tests/req_4.5.cl')
-rw-r--r--vo/votest/tests/req_4.5.cl36
1 files changed, 36 insertions, 0 deletions
diff --git a/vo/votest/tests/req_4.5.cl b/vo/votest/tests/req_4.5.cl
new file mode 100644
index 00000000..a35ace57
--- /dev/null
+++ b/vo/votest/tests/req_4.5.cl
@@ -0,0 +1,36 @@
+#
+# Select DAL results for download.
+
+# Set the test description string.
+votest.descr = "Select DAL results for download"
+
+print ("------------------------------------------------------------------")
+print ("Req 4.5: Users shall be able to select which data returned by a")
+print (" DAL service query is to be downloaded to local disk.")
+print ("------------------------------------------------------------------")
+
+
+fcache init
+
+# Execute the test commands.
+
+string ofn1, ofn2
+
+ofn1 = mktemp ("tmp$req45")
+ofn2 = mktemp ("tmp$req45") // ".fits"
+
+# Get an SIA service result.
+getimg ("dss", "m83", size=0.1, output=ofn1, format="raw")
+
+# Select only the FITS data. Note the use of the column name here
+# implies some knowledge of the table schema.
+tselect (ofn1, ofn2, expr="Format ?= 'fits'")
+
+# Print the URLs we would like to download.
+tdump (ofn2, columns="URL", cdfile="", pfile="", datafile="STDOUT")
+
+# Clean up.
+delete (ofn1, verify-, >& "dev$null")
+delete (ofn2, verify-, >& "dev$null")
+
+