tests: add tests for nitpretty
[nit.git] / tests / test_pretty / test_prims1.nit
diff --git a/tests/test_pretty/test_prims1.nit b/tests/test_pretty/test_prims1.nit
new file mode 100644 (file)
index 0000000..721a3e1
--- /dev/null
@@ -0,0 +1,48 @@
+# 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.
+
+# prims
+
+var a = true
+var b = false
+
+var c          =        10
+       var d = -10
+var e = 1.12
+
+var f = -1.12
+var n = 'a'
+var o = null
+var p = 0x12345678
+
+# strings
+
+var g = "test"
+var h1 = "Hello {g}"
+var h2 = "Hello \"{g}\" Hello"
+var h3 = "Hello {g}"
+       var m = """
+bla
+       bla
+
+bla"""
+
+       # arrays
+
+var j = [1,2,3]
+var k=[ 1 .. 2 [
+var l  = [1..2]
+
+
+