Fixup fromcvs/togit conversion
[minix-pkgsrc.git] / lang / mpd / patches / patch-be
blob7bc0b14a38de396fda0e3c40c54a2a9839f49f7a
1 $NetBSD$
3 --- vsuite/quick/ptrstr/pointer.mpd.orig        2005-10-17 22:06:31.000000000 +0200
4 +++ vsuite/quick/ptrstr/pointer.mpd
5 @@ -0,0 +1,33 @@
6 +resource pointer()
7 +  type pt = ptr int
8 +  pt foo
9 +  pt bar
10 +  pt baz
11 +  pt nul
12 +  string[20] foos
13 +  string[20] bars
14 +  
15 +  write("Testing pointer-string-pointer conversions:")
17 +  nul = null
18 +  write("Null pointer:", nul, "; string:", string(nul),
19 +       "; int:", int(nul), "; pt(==null==):", pt("==null=="))
21 +  baz = new(int)
23 +  foo = new(int)
24 +  foos= string(foo)
26 +  bar = pt(foos)
27 +  bars= string(bar)
29 +  baz = pt(foos||"X")
31 +  write("pointer  identity:", foo == bar)
32 +  write("string   identity:", foos == bars)
33 +  write("pointerX identity:", foo == baz)
35 +  write("Expect invalid conversion:")
36 +  baz = pt("invalid")
38 +end