home *** CD-ROM | disk | FTP | other *** search
- /* RxDS_test.rexx --- test for RexxDosSupport.library */
-
- call addlib("RexxDosSupport.library",0,-30,2)
- say "foobar"
-
- if ~ MakeDir("ram:foo") then say fault(rc, "test");
- if ~ Rename("ram:foo","ram:bar") then say fault(rc, "test");
- if ~ SetComment("ram:bar","stupit comment") then say fault(rc, "test");
- if ~ SetProtection("ram:bar",'00000000'x) then say fault(rc, "test");
- if ~ Delete("ram:bar") then say fault(rc, "test");
-
- text = fault(0,"test")
- if rc = 0 then say text
- text = fault(215,"test")
- if rc = 0 then say text
- text = fault(215)
- if rc = 0 then say text
-
- server = 'default'
-
- template = "name/A,,passwd,server/K,prio/N"
- input = "hartmut foobar prio 10"
-
- if ReadArgs(input,template) then
- say args.name '--' args.passwd '--' args.server '--' args.prio
- say name '--' passwd '--' server '--' prio
- if ReadArgs(input,template,"args.") then
- say args.name '--' args.passwd '--' args.server '--' args.prio
-
- if ~ ReadArgs("server=default", template, "args.") then
- say Fault(rc,"test")
-
- template = "name/M,test/S"
- trace ?r
- input = "ich du er sie es test"
-
- if ReadArgs(input,template) then do
- say name.count test
- do i = 0 for name.count by 1
- say name.i
- end
- end
-
- pattern = "ha*mut"
- string = "hartmut"
-
- say MatchPattern(pattern,string);
-
- string = Upper(string)
- say MatchPattern(pattern,string);
- say MatchPattern(pattern,string,"N");
-
- string = "hartmut"
- pattern = parsePattern(string)
- say rc
- pattern = ParsePattern("ha*mut")
- say MatchPattern(pattern,string,,"P");
- string = Upper(string)
- say MatchPattern(pattern,string,,"P");
- pattern = ParsePattern("har*ut","N")
- say MatchPattern(pattern,string,"N","P");
-
-
- result = GetVar("foobar")
- IF rc = 0 THEN
- say "foobar has value" result;
- else
- say "foobar not set"
-
- SetVar("foobar", "test", "L")
- result = GetVar("foobar")
- IF rc = 0 THEN say "foobar has value" result;
- else say "foobar not set"
- reslt = GetVar("foobar","L")
- IF rc = 0 THEN say "L: foobar has value" result;
- else say "L: foobar not set"
- result = GetVar("foobar","G")
- IF rc = 0 THEN say "G: foobar has value" result;
- else say "G: foobar not set"
- say DeleteVar("foobar", "L")
-
-