From 58d6dbd743496872c1839dfd75d56d38720f663d Mon Sep 17 00:00:00 2001 From: is Date: Wed, 9 Mar 2005 20:38:26 +0000 Subject: Add regression test for pointer-string-pointer conversion. --- lang/sr/distinfo | 5 ++++- lang/sr/patches/patch-bd | 9 +++++++++ lang/sr/patches/patch-be | 34 ++++++++++++++++++++++++++++++++++ lang/sr/patches/patch-bf | 9 +++++++++ 4 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 lang/sr/patches/patch-bd create mode 100644 lang/sr/patches/patch-be create mode 100644 lang/sr/patches/patch-bf (limited to 'lang') diff --git a/lang/sr/distinfo b/lang/sr/distinfo index b5b3c03a6aa..ce2d9085543 100644 --- a/lang/sr/distinfo +++ b/lang/sr/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.14 2005/03/08 13:49:49 is Exp $ +$NetBSD: distinfo,v 1.15 2005/03/09 20:38:26 is Exp $ SHA1 (sr233.tar.Z) = 0354987527ed1e84c32d3b1fc6bacb65d647f337 Size (sr233.tar.Z) = 1424566 bytes @@ -17,3 +17,6 @@ SHA1 (patch-az) = 1560c8ea0b760e2fb97385e565d87a49a879c6a2 SHA1 (patch-ba) = a29a664d693585ff39bc1f8d2c4b165981cde72a SHA1 (patch-bb) = 6214584bde5a05386d0f31690b30a9c0a8c299af SHA1 (patch-bc) = be4f8c47486c5b6933494f4e92fd8c340425a167 +SHA1 (patch-bd) = d7452cc05f1b53d69369804fd00fe4274d6374e3 +SHA1 (patch-be) = eb28ba9ef73c0a030b8decb8b9f5f7e4c340ade5 +SHA1 (patch-bf) = 37d5d844f7db283b7dfb4c8fbef9d8042334e28e diff --git a/lang/sr/patches/patch-bd b/lang/sr/patches/patch-bd new file mode 100644 index 00000000000..73ba48a2723 --- /dev/null +++ b/lang/sr/patches/patch-bd @@ -0,0 +1,9 @@ +$NetBSD: patch-bd,v 1.1 2005/03/09 20:38:26 is Exp $ + +--- /dev/null 2005-03-09 09:35:26.000000000 +0100 ++++ vsuite/quick/ptrstr/No_input.std +@@ -0,0 +1,4 @@ ++Testing pointer-string-pointer conversions: ++Null pointer: ==null== ; string: ==null== ; int: 0 ; pt(==null==): ==null== ++pointer identity: true ++string identity: true diff --git a/lang/sr/patches/patch-be b/lang/sr/patches/patch-be new file mode 100644 index 00000000000..9d22f8e7281 --- /dev/null +++ b/lang/sr/patches/patch-be @@ -0,0 +1,34 @@ +$NetBSD: patch-be,v 1.1 2005/03/09 20:38:26 is Exp $ + +--- /dev/null 2005-03-09 09:35:53.000000000 +0100 ++++ vsuite/quick/ptrstr/pointer.sr +@@ -0,0 +1,29 @@ ++resource hello() ++ type pt = ptr int ++ type pa = ptr [1:2]int ++ var foo: pa ++ var bar: pa ++ var baz: pa ++ var nul: pa ++ var foos: string[20] ++ var bars: string[20] ++ var anint: int ++ ++ write("Testing pointer-string-pointer conversions:") ++ ++ nul := null ++ write("Null pointer:", nul, "; string:", string(nul), ++ "; int:", int(nul), "; pt(==null==):", pt("==null==")) ++ ++ baz := new([1:2]int) ++ ++ foo := new([1:2]int) ++ foos:= string(foo) ++ ++ bar := pa(foos||"x") ++ bars:= string(bar) ++ ++ write("pointer identity:", foo = bar) ++ write("string identity:", foos = bars) ++ ++end diff --git a/lang/sr/patches/patch-bf b/lang/sr/patches/patch-bf new file mode 100644 index 00000000000..cac6d4a0289 --- /dev/null +++ b/lang/sr/patches/patch-bf @@ -0,0 +1,9 @@ +$NetBSD: patch-bf,v 1.1 2005/03/09 20:38:26 is Exp $ + +--- /dev/null 2005-03-09 09:36:06.000000000 +0100 ++++ vsuite/quick/ptrstr/Script +@@ -0,0 +1,4 @@ ++# ignatios Wed Mar 9 09:17:45 CET 2005 ++0 sr /usr/home/is/srtest/pointer.sr ++0 run ++0 rm -rf Interfaces core *.out -- cgit v1.2.3