diff options
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)) +} |