Sie sind auf Seite 1von 2

%! % Check that operators do their access tests correctly. % $Id$ % proc dotest => .

/dotest { dup mark exch stopped not % False if error, true if no error. { (Allowed access: ) print cleartomark == } if clear } def 0 0 moveto % So the show commands don't bomb because of nocurrentpoint. { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { [1 2] executeonly aload } (string) executeonly (seek) anchorsearch } (string) (seek) executeonly anchorsearch } 100 101 (string) noaccess ashow} 100 1 array readonly astore } 100 101 102 103 104 (string) noaccess awidthshow } 1 dict noacess begin } 1 array executeonly 1 array copy } 1 array 1 array readonly copy } 1 dict noaccess 1 dict copy } 1 dict 1 dict readonly copy } 1 string executeonly 1 string copy } 1 string 1 string readonly copy } (100) executeonly cvi } (string) executeonly cvn } (100.001) executeonly cvr } 1 10 1 string readonly cvrs } true 5 string readonly cvs } 1 dict readonly begin /foo true def } 10 array readonly dictstack } 1 string executeonly 1 string eq } 1 string 1 string executeonly eq } 10 array readonly execstack } 1 string noaccess executeonly } 1 array noaccess executeonly } 1 array executeonly { pop } forall } 1 dict noaccess { pop pop } forall } 1 string executeonly { pop } forall } (string1) executeonly (string2) ge } (string1) (string2) executeonly ge } 1 array executeonly 0 get } 1 dict noaccess /key get } 1 string executeonly 0 get } 1 array executeonly 0 1 getinterval } 1 string executeonly 0 1 getinterval } (string1) executeonly (string2) gt } (string1) (string2) executeonly gt } 1 dict noaccess /key known } {} (string) executeonly kshow } (string1) executeonly (string2) le } (string1) (string2) executeonly le } dotest dotest dotest dotest dotest dotest dotest dotest dotest dotest dotest dotest dotest dotest dotest dotest dotest dotest dotest dotest dotest dotest dotest dotest dotest dotest dotest dotest dotest dotest dotest dotest dotest dotest dotest dotest dotest dotest dotest dotest dotest

{ 1 array executeonly length } dotest { 1 dict noaccess length } dotest { 1 string executeonly length } dotest %%{ /foo 1 dict def foo begin /bar foo def bar noaccess pop /key load } dotest { (string1) executeonly (string2) lt } dotest { (string1) (string2) executeonly lt } dotest { 1 dict noaccess maxlength } dotest { 1 string executeonly 1 string ne } dotest { 1 string 1 string executeonly ne } dotest %{ newpath 0 0 moveto (a) false charpath % {} {} {} {} pathforall closepath } dotest { 1 array executeonly 0 put } dotest { 1 dict noaccess /key put } dotest { 1 string executeonly 0 put } dotest { 1 array executeonly 0 1 putinterval } dotest { 1 string executeonly 0 1 putinterval } dotest { (access.ps) (r) file executeonly read } dotest { (access.ps) (r) file executeonly 10 string readhexstring } dotest { (access.ps) (r) file 10 string readonly readhexstring } dotest { (access.ps) (r) file executeonly 100 string readline } dotest { (access.ps) (r) file 100 string readonly readline } dotest { (access.ps) (r) file executeonly 10 string readstring } dotest { (access.ps) (r) file 10 string readonly readstring } dotest % run does not check for no read access? { (string) executeonly (seek) search } dotest { (string) (seek) executeonly search } dotest { (string) executeonly show } %% some test for store. { (string) executeonly stringwidth } dotest { (access.ps) (r) file executeonly token } dotest { (10) executeonly token } dotest { /foo 1 dict def foo begin /bar foo def bar noaccess pop /key where } dotest { 100 101 102 (string) noaccess widthshow } dotest { (/tmp/_.ps) noaccess (w) file closefile } dotest { (/tmp/_.ps) (w) noaccess file closefile } dotest { (/tmp/_.ps) (w) file executeonly 100 write } dotest { (/tmp/_.ps) (w) file executeonly 10 string writehexstring } dotest { (/tmp/_.ps) (w) file 10 string executeonly writehexstring } dotest { (/tmp/_.ps) (w) file executeonly 10 string writestring } dotest { (/tmp/_.ps) (w) file 10 string executeonly writestring } dotest

Das könnte Ihnen auch gefallen