tests: test `-e` and `-n` for the nit interpreter
authorJean Privat <jean@pryen.org>
Tue, 20 Oct 2015 22:08:07 +0000 (18:08 -0400)
committerJean Privat <jean@pryen.org>
Tue, 20 Oct 2015 22:08:07 +0000 (18:08 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

tests/nit.args
tests/niti.skip
tests/nitvm.skip
tests/sav/nit_args5.res [new file with mode: 0644]
tests/sav/nit_args6.res [new file with mode: 0644]

index 8a91562..9327c80 100644 (file)
@@ -2,3 +2,5 @@
 base_simple3.nit
 -m test_mixin.nit ../examples/hello_world.nit
 -D text=hello -D num=42 -D flag test_define.nit
+-e 'print "hello world"'
+-n -e 'print line' test_prog/README.md test_prog/test_prog.nit
index ef83f4d..2fc5a83 100644 (file)
@@ -2,6 +2,8 @@ shoot_logic
 nit_args1
 nit_args3
 nit_args4
+nit_args5
+nit_args6
 nitvm_args1
 nitvm_args3
 nitc_args1
index ef83f4d..2fc5a83 100644 (file)
@@ -2,6 +2,8 @@ shoot_logic
 nit_args1
 nit_args3
 nit_args4
+nit_args5
+nit_args6
 nitvm_args1
 nitvm_args3
 nitc_args1
diff --git a/tests/sav/nit_args5.res b/tests/sav/nit_args5.res
new file mode 100644 (file)
index 0000000..3b18e51
--- /dev/null
@@ -0,0 +1 @@
+hello world
diff --git a/tests/sav/nit_args6.res b/tests/sav/nit_args6.res
new file mode 100644 (file)
index 0000000..bfacdb8
--- /dev/null
@@ -0,0 +1,35 @@
+Test program for model tools.
+
+This program creates a fake model that can be used to test tools like:
+
+* `nitdoc`
+* `nitmetrics`
+* `nitx`
+* or others `modelbuilder`.
+# 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.
+
+# A test program with a fake model to check model tools.
+module test_prog
+
+import rpg
+import game
+
+class Starter
+       fun start do end
+end
+
+var starter = new Starter
+starter.start
+