diff --git a/tests/test/nt.a.pp b/tests/test/nt.a.pp new file mode 100644 index 0000000000..16f488795f --- /dev/null +++ b/tests/test/nt.a.pp @@ -0,0 +1,15 @@ +unit nt.a; + +interface + +Function GetIt : String; + +implementation + +Function GetIt : String; + +begin + getit:='a1'; +end; + +end. \ No newline at end of file diff --git a/tests/test/nt.nst.pp b/tests/test/nt.nst.pp new file mode 100644 index 0000000000..923ec81047 --- /dev/null +++ b/tests/test/nt.nst.pp @@ -0,0 +1,15 @@ +unit nt.nst; + +interface + +Procedure HelloThere; + +implementation + +Procedure HelloThere; + +begin + Writeln('Hello, there'); +end; + +end. \ No newline at end of file diff --git a/tests/test/nt2.a.pp b/tests/test/nt2.a.pp new file mode 100644 index 0000000000..486fecdbfc --- /dev/null +++ b/tests/test/nt2.a.pp @@ -0,0 +1,15 @@ +unit nt2.a; + +interface + +Function GetIt : String; + +implementation + +Function GetIt : String; + +begin + getit:='a2'; +end; + +end. \ No newline at end of file diff --git a/tests/test/nt2.nst2.pp b/tests/test/nt2.nst2.pp new file mode 100644 index 0000000000..9a118e380d --- /dev/null +++ b/tests/test/nt2.nst2.pp @@ -0,0 +1,15 @@ +unit nt2.nst2; + +interface + +Procedure HelloThereToo; + +implementation + +Procedure HelloThereToo; + +begin + Writeln('Hello, there too!'); +end; + +end. \ No newline at end of file diff --git a/tests/test/tnamesp.pp b/tests/test/tnamesp.pp new file mode 100644 index 0000000000..ba5599a853 --- /dev/null +++ b/tests/test/tnamesp.pp @@ -0,0 +1,7 @@ +{$NAMESPACES nt} + +uses nst; + +begin + hellothere; +end. \ No newline at end of file diff --git a/tests/test/tnamesp2.pp b/tests/test/tnamesp2.pp new file mode 100644 index 0000000000..a1a0764c5b --- /dev/null +++ b/tests/test/tnamesp2.pp @@ -0,0 +1,8 @@ +{$NAMESPACES nt2,nt} + +uses nst,nst2; + +begin + hellothere; + hellothereToo; +end. \ No newline at end of file diff --git a/tests/test/tnamesp3.pp b/tests/test/tnamesp3.pp new file mode 100644 index 0000000000..1cd3fa16b3 --- /dev/null +++ b/tests/test/tnamesp3.pp @@ -0,0 +1,15 @@ +// searched from last to first ! +{$NAMESPACES nt2,nt} + +uses a; + +var + which : string; +begin + which:=GetIt; + if (which<>'a1') then + begin + Writeln('Wrong namespace used, expected a1, but got: ',which); + Halt(1); + end; +end. \ No newline at end of file