diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
commit | fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch) | |
tree | bdda434976bc09c864f2e4fa6f16ba1952b1e555 /vo/votest/tests/req_3.2.cl | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'vo/votest/tests/req_3.2.cl')
-rw-r--r-- | vo/votest/tests/req_3.2.cl | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/vo/votest/tests/req_3.2.cl b/vo/votest/tests/req_3.2.cl new file mode 100644 index 00000000..bc11e974 --- /dev/null +++ b/vo/votest/tests/req_3.2.cl @@ -0,0 +1,46 @@ +# +# Access every record in a Registry result record. + +# Set the test description string. +votest.descr = "Access every record in a Registry result record" + +print ("------------------------------------------------------------------") +print ("Req 3.3: Users shall have access to all information in the query") +print (" return record.") +print ("------------------------------------------------------------------") + + +fcache init + +# ------------------------------------------- +# Execute the test commands. +# ------------------------------------------- + + +# ------------------------------------------- +# Using the REGISTRY task we can print all +# fields in the record as follows: +# ------------------------------------------- + +registry ("noao", verbose+, record=2, interactive-) +printf ("\n\n") + + +# ------------------------------------------- +# Programmatically this is done as follows: +# ------------------------------------------- +int ires, icount + +ires = regSearch ("noao", 0) +icount = regResCount (ires) + +printf ("\nFound %d records:\n\n", icount) + +printf ("Num %10.10s %s\n", "ShortName", "Title") +printf ("--- %10.10s %s\n", "---------", "-----") + +for (i=0; i < icount; i=i+1) { + printf ("%3d %10.10s %s\n", (i+1), + trim(regValue (ires, "ShortName", i)), + trim(regValue (ires, "Title", i)) +} |