-
Notifications
You must be signed in to change notification settings - Fork 4
/
test.f90
149 lines (143 loc) · 8.4 KB
/
test.f90
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
program test
use fexp
print*, "Regexp, String, Result, expected result"
print*, "Foo, FooBar, ", match("Foo", "FooBar"), "true"
print*, "Poo, FooBar, ", match("Poo", "FooBar"), "false"
print*, "Bar, FooBar, ", match("Bar", "FooBar"), "true"
print*, "Par, FooBar, ", match("Par", "FooBar"), "false"
print*, "Foo, Foo, ", match("Foo", "Foo"), "true"
print*, "Fo, Foo, ", match("Fo", "Foo"), "true"
print*, "Foo, Fo, ", match("Foo", "Fo"), "false"
print*, "ooB, FooBar, ", match("ooB", "FooBar"), "true"
print*, "ooP, FooBar, ", match("ooP", "FooBar"), "false"
print*, "., FooBar, ", match(".", "FooBar"), "true"
print*, "P., FooBar, ", match("P.", "FooBar"), "false"
print*, "^Foo, FooBar, ", match("^Foo", "FooBar"), "true"
print*, "^Bar, FooBar, ", match("^Bar", "FooBar"), "false"
print*, "Foo$, FooBar, ", match("Foo$", "FooBar"), "false"
print*, "Bar$, FooBar, ", match("Bar$", "FooBar"), "true"
print*, ".*o, FooBar, ", match(".*o", "FooBar"), "true"
print*, "o*o, FooBar, ", match("o*o", "FooBar"), "true"
print*, "P*o, FooBar, ", match("P*o", "FooBar"), "true"
print*, "Fo*o, FooBar, ", match("Fo*o", "FooBar"), "true"
print*, "Po*o, FooBar, ", match("Po*o", "FooBar"), "false"
print*, ".+o, FooBar, ", match(".+o", "FooBar"), "true"
print*, "o+o, FooBar, ", match("o+o", "FooBar"), "true"
print*, "P+o, FooBar, ", match("P+o", "FooBar"), "false"
print*, "Fo+o, FooBar, ", match("Fo+o", "FooBar"), "true"
print*, "Po+o, FooBar, ", match("Po+o", "FooBar"), "false"
print*, ".?o, FooBar, ", match(".?o", "FooBar"), "true"
print*, "o?o, FooBar, ", match("o?o", "FooBar"), "true"
print*, "P?o, FooBar, ", match("P?o", "FooBar"), "true"
print*, "Fo?o, FooBar, ", match("Fo?o", "FooBar"), "true"
print*, "Po?o, FooBar, ", match("Po?o", "FooBar"), "false"
print*, "F[po]o, FooBar, ", match("F[po]o", "FooBar"), "true"
print*, "F[op]o, FooBar, ", match("F[op]o", "FooBar"), "true"
print*, "F[qp]o, FooBar, ", match("F[qp]o", "FooBar"), "false"
print*, "F[^po]o, FooBar, ", match("F[^po]o", "FooBar"), "false"
print*, "F[^op]o, FooBar, ", match("F[^op]o", "FooBar"), "false"
print*, "F[^qp]o, FooBar, ", match("F[^qp]o", "FooBar"), "true"
print*, "F\do, FooBar, ", match("F\do", "FooBar"), "false"
print*, "F\wo, FooBar, ", match("F\wo", "FooBar"), "true"
print*, "F\do, F5oBar, ", match("F\do", "F5oBar"), "true"
print*, "F\wo, F5oBar, ", match("F\wo", "F5oBar"), "true"
print*, "F\Do, FooBar, ", match("F\Do", "FooBar"), "true"
print*, "F\Wo, FooBar, ", match("F\Wo", "FooBar"), "false"
print*, "F\Do, F5oBar, ", match("F\Do", "F5oBar"), "false"
print*, "F\Wo, F5oBar, ", match("F\Wo", "F5oBar"), "false"
print*, "F[po]*o, FooBar, ", match("F[po]*o", "FooBar"), "true"
print*, "F[56]*o, F5oBar, ", match("F[56]*o", "F5oBar"), "true"
print*, "F[46]*o, F5oBar, ", match("F[46]*o", "F5oBar"), "false"
print*, "F[46]*5, F5oBar, ", match("F[46]*5", "F5oBar"), "true"
print*, "F[46]*5o, F5oBar, ", match("F[46]*5o", "F5oBar"), "true"
print*, "F[op]*o, FooBar, ", match("F[op]*o", "FooBar"), "true"
print*, "F[qp]*o, FooBar, ", match("F[qp]*o", "FooBar"), "true"
print*, "P[qp]*o, FooBar, ", match("P[qp]*o", "FooBar"), "false"
print*, "F[^po]*o, FooBar, ", match("F[^po]*o", "FooBar"), "true"
print*, "F[^op]*o, FooBar, ", match("F[^op]*o", "FooBar"), "true"
print*, "F[^qp]*o, FooBar, ", match("F[^qp]*o", "FooBar"), "true"
print*, "P[^qp]*o, FooBar, ", match("P[^qp]*o", "FooBar"), "false"
print*, "F\d*o, FooBar, ", match("F\d*o", "FooBar"), "true"
print*, "F\w*o, FooBar, ", match("F\w*o", "FooBar"), "true"
print*, "F\d*o, F5oBar, ", match("F\d*o", "F5oBar"), "true"
print*, "F\w*o, F5oBar, ", match("F\w*o", "F5oBar"), "true"
print*, "F\D*o, FooBar, ", match("F\D*o", "FooBar"), "true"
print*, "F\W*o, FooBar, ", match("F\W*o", "FooBar"), "true"
print*, "F\D*o, F5oBar, ", match("F\D*o", "F5oBar"), "false"
print*, "F\D*5, F5oBar, ", match("F\D*5", "F5oBar"), "true"
print*, "F\W*o, F5oBar, ", match("F\W*o", "F5oBar"), "false"
print*, "F\W*5, F5oBar, ", match("F\W*5", "F5oBar"), "true"
print*, "F[po]?o, FooBar, ", match("F[po]?o", "FooBar"), "true"
print*, "F[56]?o, F5oBar, ", match("F[56]?o", "F5oBar"), "true"
print*, "F[46]?o, F5oBar, ", match("F[46]?o", "F5oBar"), "false"
print*, "F[46]?5, F5oBar, ", match("F[46]?5", "F5oBar"), "true"
print*, "F[46]?5o, F5oBar, ", match("F[46]?5o", "F5oBar"), "true"
print*, "F[op]?o, FooBar, ", match("F[op]?o", "FooBar"), "true"
print*, "F[qp]?o, FooBar, ", match("F[qp]?o", "FooBar"), "true"
print*, "P[qp]?o, FooBar, ", match("P[qp]?o", "FooBar"), "false"
print*, "F[^po]?o, FooBar, ", match("F[^po]?o", "FooBar"), "true"
print*, "F[^op]?o, FooBar, ", match("F[^op]?o", "FooBar"), "true"
print*, "F[^qp]?o, FooBar, ", match("F[^qp]?o", "FooBar"), "true"
print*, "P[^qp]?o, FooBar, ", match("P[^qp]?o", "FooBar"), "false"
print*, "F\d?o, FooBar, ", match("F\d?o", "FooBar"), "true"
print*, "F\w?o, FooBar, ", match("F\w?o", "FooBar"), "true"
print*, "F\d?o, F5oBar, ", match("F\d?o", "F5oBar"), "true"
print*, "F\w?o, F5oBar, ", match("F\w?o", "F5oBar"), "true"
print*, "F\D?o, FooBar, ", match("F\D?o", "FooBar"), "true"
print*, "F\W?o, FooBar, ", match("F\W?o", "FooBar"), "true"
print*, "F\D?o, F5oBar, ", match("F\D?o", "F5oBar"), "false"
print*, "F\D?5, F5oBar, ", match("F\D?5", "F5oBar"), "true"
print*, "F\W?o, F5oBar, ", match("F\W?o", "F5oBar"), "false"
print*, "F\W?5, F5oBar, ", match("F\W?5", "F5oBar"), "true"
print*, "F[po]+o, FooBar, ", match("F[po]+o", "FooBar"), "true"
print*, "F[56]+o, F5oBar, ", match("F[56]+o", "F5oBar"), "true"
print*, "F[46]+o, F5oBar, ", match("F[46]+o", "F5oBar"), "false"
print*, "F[46]+5, F5oBar, ", match("F[46]+5", "F5oBar"), "false"
print*, "F[46]+5o, F5oBar, ", match("F[46]+5o", "F5oBar"), "false"
print*, "F[op]+o, FooBar, ", match("F[op]+o", "FooBar"), "true"
print*, "F[qp]+o, FooBar, ", match("F[qp]+o", "FooBar"), "false"
print*, "P[qp]+o, FooBar, ", match("P[qp]+o", "FooBar"), "false"
print*, "F[^po]+o, FooBar, ", match("F[^po]+o", "FooBar"), "false"
print*, "F[^op]+o, FooBar, ", match("F[^op]+o", "FooBar"), "false"
print*, "F[^qp]+o, FooBar, ", match("F[^qp]+o", "FooBar"), "true"
print*, "P[^qp]+o, FooBar, ", match("P[^qp]+o", "FooBar"), "false"
print*, "F\d+o, FooBar, ", match("F\d+o", "FooBar"), "false"
print*, "F\w+o, FooBar, ", match("F\w+o", "FooBar"), "true"
print*, "F\d+o, F5oBar, ", match("F\d+o", "F5oBar"), "true"
print*, "F\w+o, F5oBar, ", match("F\w+o", "F5oBar"), "true"
print*, "F\D+o, FooBar, ", match("F\D+o", "FooBar"), "true"
print*, "F\W+o, FooBar, ", match("F\W+o", "FooBar"), "false"
print*, "F\D+o, F5oBar, ", match("F\D+o", "F5oBar"), "false"
print*, "F\D+5, F5oBar, ", match("F\D+5", "F5oBar"), "false"
print*, "F\W+o, F5oBar, ", match("F\W+o", "F5oBar"), "false"
print*, "F\W+5, F5oBar, ", match("F\W+5", "F5oBar"), "false"
print*, "\d+\.\d*, 1.9, ", match("\d+\.\d*", "1.9"), "true"
print*, "\d+\.\d*, 1.99, ", match("\d+\.\d*", "1.99"), "true"
print*, "\d+\.\d*, 1.999, ", match("\d+\.\d*", "1.999"), "true"
print*, "\d+\.\d*, 1.9999, ", match("\d+\.\d*", "1.9999"), "true"
print*, "\d+\.\d*, 1.99999, ", match("\d+\.\d*", "1.99999"), "true"
print*, "\d+\.\d*, 11.99999, ", match("\d+\.\d*", "11.99999"), "true"
print*, "\d+\.\d*, 111.99999, ", match("\d+\.\d*", "111.99999"), "true"
print*, "\d+\.\d*, 1111.99999, ", match("\d+\.\d*", "1111.99999"), "true"
print*, "\d+\.\d*, 11111.99999, ", match("\d+\.\d*", "11111.99999"), "true"
print*, "\d+\.\d*, 111111.99999, ", match("\d+\.\d*", "111111.99999"), "true"
print*, "^\d+\.\d*, 1.9, ", match("^\d+\.\d*", "1.9"), "true"
print*, "^\d+\.\d*, 1.99, ", match("^\d+\.\d*", "1.99"), "true"
print*, "^\d+\.\d*, 1.999, ", match("^\d+\.\d*", "1.999"), "true"
print*, "^\d+\.\d*, 1.9999, ", match("^\d+\.\d*", "1.9999"), "true"
print*, "^\d+\.\d*, 1.99999, ", match("^\d+\.\d*", "1.99999"), "true"
print*, "^\d+\.\d*, 11.99999, ", match("^\d+\.\d*", "11.99999"), "true"
print*, "^\d+\.\d*, 111.99999, ", match("^\d+\.\d*", "111.99999"), "true"
print*, "^\d+\.\d*, 1111.99999, ", match("^\d+\.\d*", "1111.99999"), "true"
print*, "^\d+\.\d*, 11111.99999, ", match("^\d+\.\d*", "11111.99999"), "true"
print*, "^\d+\.\d*, 111111.99999, ", match("^\d+\.\d*", "111111.99999"), "true"
print*, "a\d+\.\d*, a1.9, ", match("a\d+\.\d*", "a1.9"), "true"
print*, "a\d+\., a1.9, ", match("a\d+\.", "a1.9"), "true"
print*, "a\d+, a1.9, ", match("a\d+", "a1.9"), "true"
print*, "a, a1.9, ", match("a", "a1.9"), "true"
print*, '\\, \, ', match("\\", "\"), "true"
print*, "\., \, ", match("\.", "\"), "false"
print*, "., \, ", match(".", "\"), "true"
print*, "F[qpo, FooBar, Stops!"
print*, match("F[qpo", "FooBar")
end program test