Merge: doc: fixed some typos and other misc. corrections
[nit.git] / tests / test_augmented.nit
1 # This file is part of NIT ( http://www.nitlanguage.org ).
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 # http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 var c1 = u'G'
16 var c2 = u'𐏓'
17
18 var s = b"String\x41\x42"
19 var s2 = "String\u0103D3"
20 var s3 = b"String\x41\xFD"
21 var s4 = re"String"i
22 #alt1 s4 = b"String{c1}"
23 var s5 = "String\xFD"
24 var s6 = raw"\nStr\x00"
25 var s7 = raw"\nString{c2}\x41"
26 var s8 = "\nString{c2}\x41"
27 var s9 = re"\n{c1}String"imb
28 var s10 = re"String"b
29 var s11 = re"String"m
30
31 print "s isa {s.class_name}"
32 print s
33 print s.hexdigest
34 print "s2 isa {s2.class_name}"
35 print s2
36 print "s3 isa {s3.class_name}"
37 print s3
38 print s3.hexdigest
39 print "s4 isa {s4.class_name}"
40 print s4
41 print s4.ignore_case
42 print s4.extended
43 print s4.newline
44 print "s5 isa {s5.class_name}"
45 print s5
46 print "s6 isa {s6.class_name}"
47 print s6
48 print "s7 isa {s7.class_name}"
49 print s7
50 print "s8 isa {s8.class_name}"
51 print s8
52 print "s9 isa {s9.class_name}"
53 print s9
54 print s9.ignore_case
55 print s9.extended
56 print s9.newline
57 print "s10 isa {s10.class_name}"
58 print s10
59 print s10.ignore_case
60 print s10.extended
61 print s10.newline
62 print "s11 isa {s11.class_name}"
63 print s11
64 print s11.ignore_case
65 print s11.extended
66 print s11.newline