home *** CD-ROM | disk | FTP | other *** search
/ jppd.dyndns.org / jppd.dyndns.org.tar / jppd.dyndns.org / QUERYPRO / Impressora_PDF / converter.exe / GPLGS / acctest.ps < prev    next >
Text File  |  2002-02-22  |  4KB  |  101 lines

  1. %!
  2. % Check that operators do their access tests correctly.
  3. % $Id: acctest.ps,v 1.4 2002/02/21 21:49:28 giles Exp $
  4.  
  5. % proc dotest => .
  6. /dotest
  7.   {
  8.     dup
  9.     mark
  10.     exch
  11.     stopped not % False if error, true if no error.
  12.     { (Allowed access: ) print cleartomark == }
  13.     if
  14.     clear
  15.   }
  16. def
  17.  
  18. 0 0 moveto % So the show commands don't bomb because of nocurrentpoint.
  19.  
  20. { [1 2] executeonly aload }                    dotest 
  21. { (string) executeonly (seek) anchorsearch }            dotest
  22. { (string) (seek) executeonly anchorsearch }            dotest
  23. { 100 101 (string) noaccess ashow}                dotest
  24. { 100 1 array readonly astore }                    dotest
  25. { 100 101 102 103 104 (string) noaccess awidthshow }        dotest
  26. { 1 dict noacess begin }                    dotest
  27. { 1 array executeonly 1 array copy }                dotest
  28. { 1 array 1 array readonly copy }                dotest
  29. { 1 dict noaccess 1 dict copy }                    dotest
  30. { 1 dict 1 dict readonly copy }                    dotest
  31. { 1 string executeonly 1 string copy }                dotest
  32. { 1 string 1 string readonly copy }                dotest
  33. { (100) executeonly cvi }                    dotest
  34. { (string) executeonly cvn }                    dotest
  35. { (100.001) executeonly cvr }                    dotest
  36. { 1 10 1 string readonly cvrs }                    dotest
  37. { true 5 string readonly cvs }                    dotest
  38. { 1 dict readonly begin /foo true def }                dotest
  39. { 10 array readonly dictstack }                    dotest 
  40. { 1 string executeonly 1 string eq }                dotest
  41. { 1 string 1 string executeonly eq }                dotest
  42. { 10 array readonly execstack }                    dotest
  43. { 1 string noaccess executeonly }                dotest
  44. { 1 array noaccess executeonly }                dotest
  45. { 1 array executeonly { pop } forall }                dotest
  46. { 1 dict noaccess { pop pop } forall }                dotest
  47. { 1 string executeonly { pop } forall }                dotest
  48. { (string1) executeonly (string2) ge }                dotest
  49. { (string1) (string2) executeonly ge }                dotest
  50. { 1 array executeonly 0 get }                    dotest
  51. { 1 dict noaccess /key get }                    dotest
  52. { 1 string executeonly 0 get }                    dotest
  53. { 1 array executeonly 0 1 getinterval }                dotest
  54. { 1 string executeonly 0 1 getinterval }            dotest
  55. { (string1) executeonly (string2) gt }                dotest
  56. { (string1) (string2) executeonly gt }                dotest
  57. { 1 dict noaccess /key known }                    dotest
  58. { {} (string) executeonly kshow }                dotest
  59. { (string1) executeonly (string2) le }                dotest
  60. { (string1) (string2) executeonly le }                dotest
  61. { 1 array executeonly length }                    dotest
  62. { 1 dict noaccess length }                    dotest
  63. { 1 string executeonly length }                    dotest
  64. %%{ /foo 1 dict def foo begin /bar foo def bar noaccess pop /key load } dotest
  65. { (string1) executeonly (string2) lt }                dotest
  66. { (string1) (string2) executeonly lt }                dotest
  67. { 1 dict noaccess maxlength }                    dotest
  68. { 1 string executeonly 1 string ne }                dotest
  69. { 1 string 1 string executeonly ne }                dotest
  70. %{ newpath 0 0 moveto (a) false charpath 
  71. %  {} {} {} {} pathforall closepath }                dotest
  72. { 1 array executeonly 0 put }                    dotest
  73. { 1 dict noaccess /key put }                    dotest
  74. { 1 string executeonly 0 put }                    dotest
  75. { 1 array executeonly 0 1 putinterval }                dotest
  76. { 1 string executeonly 0 1 putinterval }            dotest
  77. { (access.ps) (r) file executeonly read }            dotest
  78. { (access.ps) (r) file executeonly 10 string readhexstring }    dotest
  79. { (access.ps) (r) file 10 string readonly readhexstring }    dotest
  80. { (access.ps) (r) file executeonly 100 string readline }    dotest
  81. { (access.ps) (r) file 100 string readonly readline }        dotest
  82. { (access.ps) (r) file executeonly 10 string readstring }    dotest
  83. { (access.ps) (r) file 10 string readonly readstring }        dotest
  84. % run does not check for no read access?
  85. { (string) executeonly (seek) search }                dotest
  86. { (string) (seek) executeonly search }                dotest
  87. { (string) executeonly show }
  88. %% some test for store.
  89. { (string) executeonly stringwidth }                dotest
  90. { (access.ps) (r) file executeonly token }            dotest
  91. { (10) executeonly token }                    dotest
  92. { /foo 1 dict def foo begin /bar foo def bar noaccess pop /key where } dotest
  93. { 100 101 102 (string) noaccess widthshow }            dotest
  94. { (/tmp/_.ps) noaccess (w) file closefile }            dotest
  95. { (/tmp/_.ps) (w) noaccess file closefile }            dotest
  96. { (/tmp/_.ps) (w) file executeonly 100 write }            dotest
  97. { (/tmp/_.ps) (w) file executeonly 10 string writehexstring }    dotest
  98. { (/tmp/_.ps) (w) file 10 string executeonly writehexstring }    dotest
  99. { (/tmp/_.ps) (w) file executeonly 10 string writestring }    dotest
  100. { (/tmp/_.ps) (w) file 10 string executeonly writestring }    dotest
  101.