tests: add tests for the pkgconfig annotation
authorAlexis Laferrière <alexis.laf@xymus.net>
Thu, 30 Jan 2014 20:58:51 +0000 (15:58 -0500)
committerJean Privat <jean@pryen.org>
Tue, 18 Feb 2014 13:47:11 +0000 (08:47 -0500)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

tests/error_annot_pkgconfig.nit [new file with mode: 0644]
tests/sav/error_annot_pkgconfig.res [new file with mode: 0644]
tests/sav/error_annot_pkgconfig_alt0.res [new file with mode: 0644]
tests/sav/error_annot_pkgconfig_alt1.res [new file with mode: 0644]
tests/sav/error_annot_pkgconfig_alt2.res [new file with mode: 0644]
tests/sav/error_annot_pkgconfig_alt3.res [new file with mode: 0644]
tests/sav/test_annot_pkgconfig.res [new file with mode: 0644]
tests/sav/test_annot_pkgconfig_alt1.res [new file with mode: 0644]
tests/sav/test_annot_pkgconfig_alt2.res [new file with mode: 0644]
tests/test_annot_pkgconfig.nit [new file with mode: 0644]

diff --git a/tests/error_annot_pkgconfig.nit b/tests/error_annot_pkgconfig.nit
new file mode 100644 (file)
index 0000000..3a01e25
--- /dev/null
@@ -0,0 +1,20 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Copyright 2013 Alexis Laferrière <alexis.laf@xymus.net>
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#alt0# module error_annot_pkgconfig_alt0 is pkgconfig() # 0 arg
+#alt1# module error_annot_pkgconfig_alt1 is pkgconfig("missing-lib")
+#alt2# module error_annot_pkgconfig_alt2 is pkgconfig("too many args", 123)
+#alt3# module error_annot_pkgconfig_alt3 is pkgconfig(1234) # not a string
diff --git a/tests/sav/error_annot_pkgconfig.res b/tests/sav/error_annot_pkgconfig.res
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/sav/error_annot_pkgconfig_alt0.res b/tests/sav/error_annot_pkgconfig_alt0.res
new file mode 100644 (file)
index 0000000..cba1d8e
--- /dev/null
@@ -0,0 +1 @@
+alt/error_annot_pkgconfig_alt0.nit:17,48: Syntax error: unexpected ')'.
diff --git a/tests/sav/error_annot_pkgconfig_alt1.res b/tests/sav/error_annot_pkgconfig_alt1.res
new file mode 100644 (file)
index 0000000..1b0f126
--- /dev/null
@@ -0,0 +1 @@
+alt/error_annot_pkgconfig_alt1.nit:18,38--61: Error: package "missing-lib" unknown by pkg-config, make sure the development package is be installed.
diff --git a/tests/sav/error_annot_pkgconfig_alt2.res b/tests/sav/error_annot_pkgconfig_alt2.res
new file mode 100644 (file)
index 0000000..1e63dc5
--- /dev/null
@@ -0,0 +1 @@
+alt/error_annot_pkgconfig_alt2.nit:19,38--68: Syntax error: "pkgconfig" expects its arguments to be the name of the package as String literals.
diff --git a/tests/sav/error_annot_pkgconfig_alt3.res b/tests/sav/error_annot_pkgconfig_alt3.res
new file mode 100644 (file)
index 0000000..4d7fe8d
--- /dev/null
@@ -0,0 +1 @@
+alt/error_annot_pkgconfig_alt3.nit:20,38--52: Syntax error: "pkgconfig" expects its arguments to be the name of the package as String literals.
diff --git a/tests/sav/test_annot_pkgconfig.res b/tests/sav/test_annot_pkgconfig.res
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/sav/test_annot_pkgconfig_alt1.res b/tests/sav/test_annot_pkgconfig_alt1.res
new file mode 100644 (file)
index 0000000..f5f983d
--- /dev/null
@@ -0,0 +1 @@
+alt/test_annot_pkgconfig_alt1.nit:17,8--27: Error: module name missmatch; declared test_annot_pkgconfig file named test_annot_pkgconfig_alt1
diff --git a/tests/sav/test_annot_pkgconfig_alt2.res b/tests/sav/test_annot_pkgconfig_alt2.res
new file mode 100644 (file)
index 0000000..ce1bbe2
--- /dev/null
@@ -0,0 +1 @@
+alt/test_annot_pkgconfig_alt2.nit:18,8--27: Error: module name missmatch; declared test_annot_pkgconfig file named test_annot_pkgconfig_alt2
diff --git a/tests/test_annot_pkgconfig.nit b/tests/test_annot_pkgconfig.nit
new file mode 100644 (file)
index 0000000..c312bdb
--- /dev/null
@@ -0,0 +1,18 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Copyright 2013 Alexis Laferrière <alexis.laf@xymus.net>
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#alt1# module test_annot_pkgconfig is pkgconfig("sdl")
+#alt2# module test_annot_pkgconfig is pkgconfig("sdl", "egl")