tests: improve loader test with a more complex project1 directory
authorJean Privat <jean@pryen.org>
Mon, 24 Aug 2015 20:04:23 +0000 (16:04 -0400)
committerJean Privat <jean@pryen.org>
Wed, 26 Aug 2015 12:05:59 +0000 (08:05 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

16 files changed:
tests/base_import.nit
tests/project1/module1.nit
tests/project1/module2.nit
tests/project1/module3.nit [new file with mode: 0644]
tests/project1/project.ini [new file with mode: 0644]
tests/project1/project1.nit
tests/project1/project2/foo.nit [new file with mode: 0644]
tests/project1/project2/project.ini [new file with mode: 0644]
tests/project1/project2/project2.nit [new file with mode: 0644]
tests/project1/subdir/module4.nit [new file with mode: 0644]
tests/sav/base_import_alt4.res [new file with mode: 0644]
tests/sav/base_import_alt5.res [new file with mode: 0644]
tests/sav/nitls_args1.res
tests/sav/nitls_args2.res
tests/sav/nitls_args3.res
tests/sav/nitls_args4.res

index 7a057ab..8fb3e6c 100644 (file)
@@ -1,3 +1,3 @@
-import project1 #alt1# import project1::module1 #alt2# import project1::module2 #alt3# import project1::fail
+import project1 #alt1# import project1::module1 #alt2# import project1::module2 #alt3# import project1::fail #alt4# import project1::module4 #alt5# import project1::project2
 
 foo
index 576b35c..7f75de5 100644 (file)
@@ -1,3 +1,17 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# 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.
+
 import kernel
 
 fun foo do 1.output
index 4020f72..a7d5274 100644 (file)
@@ -1,3 +1,17 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# 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.
+
 import project1
 
 redef fun foo do 3.output
diff --git a/tests/project1/module3.nit b/tests/project1/module3.nit
new file mode 100644 (file)
index 0000000..e1509c9
--- /dev/null
@@ -0,0 +1,15 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# 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.
+
+import module4
diff --git a/tests/project1/project.ini b/tests/project1/project.ini
new file mode 100644 (file)
index 0000000..e69de29
index b70c23a..62a9576 100644 (file)
@@ -1,3 +1,17 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# 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.
+
 import module1
 
 redef fun foo do 2.output
diff --git a/tests/project1/project2/foo.nit b/tests/project1/project2/foo.nit
new file mode 100644 (file)
index 0000000..7058f2e
--- /dev/null
@@ -0,0 +1,13 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# 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.
diff --git a/tests/project1/project2/project.ini b/tests/project1/project2/project.ini
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/project1/project2/project2.nit b/tests/project1/project2/project2.nit
new file mode 100644 (file)
index 0000000..7058f2e
--- /dev/null
@@ -0,0 +1,13 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# 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.
diff --git a/tests/project1/subdir/module4.nit b/tests/project1/subdir/module4.nit
new file mode 100644 (file)
index 0000000..ac6563a
--- /dev/null
@@ -0,0 +1,15 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# 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.
+
+import module1
diff --git a/tests/sav/base_import_alt4.res b/tests/sav/base_import_alt4.res
new file mode 100644 (file)
index 0000000..d00491f
--- /dev/null
@@ -0,0 +1 @@
+1
diff --git a/tests/sav/base_import_alt5.res b/tests/sav/base_import_alt5.res
new file mode 100644 (file)
index 0000000..7be428f
--- /dev/null
@@ -0,0 +1 @@
+alt/base_import_alt5.nit:1,8--25: Error: cannot find module `project2` from `project1`. Tried: ., ../lib/standard, ../lib/standard/collection, alt, ../lib, ../contrib.
index accb0d6..b497cd5 100644 (file)
@@ -2,4 +2,8 @@
 project1 (\e[33mproject1\e[m)
 |--\e[1mmodule1\e[m (\e[33mproject1/module1.nit\e[m)
 |--\e[1mmodule2\e[m (\e[33mproject1/module2.nit\e[m)
-`--\e[1mproject1\e[m (\e[33mproject1/project1.nit\e[m)
+|--\e[1mmodule3\e[m (\e[33mproject1/module3.nit\e[m)
+|--\e[1mproject1\e[m (\e[33mproject1/project1.nit\e[m)
+`--subdir (\e[33mproject1/subdir\e[m)
+   `--\e[1mmodule4\e[m (\e[33mproject1/subdir/module4.nit\e[m)
+\e[1mproject2\e[m (\e[33mproject1/project2/project2.nit\e[m)
index accb0d6..b497cd5 100644 (file)
@@ -2,4 +2,8 @@
 project1 (\e[33mproject1\e[m)
 |--\e[1mmodule1\e[m (\e[33mproject1/module1.nit\e[m)
 |--\e[1mmodule2\e[m (\e[33mproject1/module2.nit\e[m)
-`--\e[1mproject1\e[m (\e[33mproject1/project1.nit\e[m)
+|--\e[1mmodule3\e[m (\e[33mproject1/module3.nit\e[m)
+|--\e[1mproject1\e[m (\e[33mproject1/project1.nit\e[m)
+`--subdir (\e[33mproject1/subdir\e[m)
+   `--\e[1mmodule4\e[m (\e[33mproject1/subdir/module4.nit\e[m)
+\e[1mproject2\e[m (\e[33mproject1/project2/project2.nit\e[m)
index accb0d6..52b93a0 100644 (file)
@@ -2,4 +2,10 @@
 project1 (\e[33mproject1\e[m)
 |--\e[1mmodule1\e[m (\e[33mproject1/module1.nit\e[m)
 |--\e[1mmodule2\e[m (\e[33mproject1/module2.nit\e[m)
-`--\e[1mproject1\e[m (\e[33mproject1/project1.nit\e[m)
+|--\e[1mmodule3\e[m (\e[33mproject1/module3.nit\e[m)
+|--\e[1mproject1\e[m (\e[33mproject1/project1.nit\e[m)
+`--subdir (\e[33mproject1/subdir\e[m)
+   `--\e[1mmodule4\e[m (\e[33mproject1/subdir/module4.nit\e[m)
+project2 (\e[33mproject1/project2\e[m)
+|--\e[1mfoo\e[m (\e[33mproject1/project2/foo.nit\e[m)
+`--\e[1mproject2\e[m (\e[33mproject1/project2/project2.nit\e[m)
index f54c342..eeed2c7 100644 (file)
@@ -1,4 +1,7 @@
 base_simple3/\e[1mbase_simple3\e[m (\e[33mbase_simple3.nit\e[m)
 project1/\e[1mmodule1\e[m (\e[33mproject1/module1.nit\e[m)
 project1/\e[1mmodule2\e[m (\e[33mproject1/module2.nit\e[m)
+project1/\e[1mmodule3\e[m (\e[33mproject1/module3.nit\e[m)
+project1/subdir/\e[1mmodule4\e[m (\e[33mproject1/subdir/module4.nit\e[m)
 project1/\e[1mproject1\e[m (\e[33mproject1/project1.nit\e[m)
+project2/\e[1mproject2\e[m (\e[33mproject1/project2/project2.nit\e[m)