diff options
author | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
---|---|---|
committer | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
commit | 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch) | |
tree | 4464880c571602d54f6ae114729bf62a89518057 /vo/votest/tests/req_3.2.cl | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
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)) +} |