fortio-namelist 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -6
- data/fortio-namelist.gemspec +1 -1
- data/lib/fortio-namelist/fortran_namelist.rb +9 -5
- data/spec/array_spec.rb +12 -12
- data/spec/empty_spec.rb +7 -6
- data/spec/identifier_spec.rb +6 -6
- data/spec/scalar_spec.rb +10 -10
- data/spec/structure_spec.rb +10 -10
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7031390445d9ff81165021b8e46fd90057b89748b6cfb7a2989cc645baeda333
|
4
|
+
data.tar.gz: e4f9bbbcc74241ba959796683606f06903ec94710350a7a2ec466532eb0ed2b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf26eaf52e837df1eaa2385971129b086a9939cf370c0b6ee77f63717239792763c2d15a4594e0dcf4b5e45399fd3e50630ec8b362966c3068d538a712f14a9b
|
7
|
+
data.tar.gz: 0d5217634f78f0963b8eafb2638d584c680fa2746336fff36e5039196f84bab4f74462b81b4e34eea0b87c4dcf184a9069c56972de85744ea342906bc9d7601f
|
data/README.md
CHANGED
@@ -29,20 +29,20 @@ Usage
|
|
29
29
|
|
30
30
|
It is enough for the user to remember the following two methods.
|
31
31
|
|
32
|
-
FortIO::Namelist.
|
32
|
+
FortIO::Namelist.parse(input, group: nil)
|
33
33
|
FortIO::Namelist.dump(root, **format_options)
|
34
34
|
|
35
35
|
### Reading namelist format string
|
36
36
|
|
37
|
-
To create a Hash object with
|
37
|
+
To create a Hash object with namelist structure by reading a string in namelist format, use the following method.
|
38
38
|
|
39
|
-
FortIO::Namelist.
|
39
|
+
FortIO::Namelist.parse(input, group: nil)
|
40
40
|
|
41
|
-
The argument `input` is given as a string, but it also accepts objects with a method `#read` returns a string like an IO object.
|
41
|
+
The argument `input` is given as a string, but it also accepts objects with a method `#read` returns a string like an IO object ('duck typing').
|
42
42
|
|
43
43
|
If the keyword argument `group` is omitted, all namelist groups included in `input` will be read. To read only a specific group, give a group name to `group`. To load multiple groups, give an array of group names to `group`.
|
44
44
|
|
45
|
-
The Hash object of the return value has a two-level structure as follows.
|
45
|
+
Use lowercase Symbol objects for both group and variable names. The Hash object of the return value has a two-level structure as follows.
|
46
46
|
|
47
47
|
{
|
48
48
|
group1: {
|
@@ -59,7 +59,7 @@ The Hash object of the return value has a two-level structure as follows.
|
|
59
59
|
:
|
60
60
|
}
|
61
61
|
|
62
|
-
|
62
|
+
The value can be Ruby's String, Integer, Float, Complex, TrueClass, or FalseClass objects, depending on the literal in the namelist. In the case that the value is an array, it will be expressed as an Array in Ruby.
|
63
63
|
|
64
64
|
Example:
|
65
65
|
|
data/fortio-namelist.gemspec
CHANGED
@@ -72,7 +72,7 @@ module FortIO::Namelist
|
|
72
72
|
@namelist = FortIO::Namelist::Parser.new.parse(text)
|
73
73
|
end
|
74
74
|
|
75
|
-
def
|
75
|
+
def parse (group, out={})
|
76
76
|
group = group.downcase
|
77
77
|
raise "no definition of namelist group '#{group}'" \
|
78
78
|
unless nml = @namelist[group]
|
@@ -230,7 +230,7 @@ module FortIO::Namelist
|
|
230
230
|
#
|
231
231
|
# FortIO::Namelist.read(input, name: nil)
|
232
232
|
#
|
233
|
-
def self.
|
233
|
+
def self.parse (input, group: nil)
|
234
234
|
case input
|
235
235
|
when String
|
236
236
|
text = input
|
@@ -250,8 +250,12 @@ module FortIO::Namelist
|
|
250
250
|
end
|
251
251
|
return groups.each_with_object({}) { |group, root|
|
252
252
|
root[group] = {}
|
253
|
-
reader.
|
254
|
-
}
|
253
|
+
reader.parse(group, root[group])
|
254
|
+
}
|
255
|
+
end
|
256
|
+
|
257
|
+
def self.read (input, group: nil)
|
258
|
+
parse(input, group: group)
|
255
259
|
end
|
256
260
|
|
257
261
|
#
|
@@ -261,7 +265,7 @@ module FortIO::Namelist
|
|
261
265
|
# return value : namelist string
|
262
266
|
#
|
263
267
|
def self.filter (input, **format_options)
|
264
|
-
config =
|
268
|
+
config = parse(input)
|
265
269
|
yield config
|
266
270
|
return dump(config, **format_options)
|
267
271
|
end
|
data/spec/array_spec.rb
CHANGED
@@ -10,7 +10,7 @@ describe "FortIO::Namelist" do
|
|
10
10
|
v2 = 6,7,8,9,10,
|
11
11
|
/
|
12
12
|
}
|
13
|
-
nml = FortIO::Namelist.
|
13
|
+
nml = FortIO::Namelist.parse(input)
|
14
14
|
is_asserted_by { nml.has_key? :example }
|
15
15
|
is_asserted_by { nml[:example].is_a? Hash }
|
16
16
|
is_asserted_by { nml[:example][:v1] == [1,2,3,4,5] }
|
@@ -21,7 +21,7 @@ describe "FortIO::Namelist" do
|
|
21
21
|
input = %{
|
22
22
|
&example v1 = 1,2,3,4,5, v2 = 6,7,8,9,10, /
|
23
23
|
}
|
24
|
-
nml = FortIO::Namelist.
|
24
|
+
nml = FortIO::Namelist.parse(input)
|
25
25
|
is_asserted_by { nml.has_key? :example }
|
26
26
|
is_asserted_by { nml[:example].is_a? Hash }
|
27
27
|
is_asserted_by { nml[:example][:v1] == [1,2,3,4,5] }
|
@@ -40,7 +40,7 @@ describe "FortIO::Namelist" do
|
|
40
40
|
v2(3:5) = 8,9,10,
|
41
41
|
/
|
42
42
|
}
|
43
|
-
nml = FortIO::Namelist.
|
43
|
+
nml = FortIO::Namelist.parse(input)
|
44
44
|
is_asserted_by { nml.has_key? :example }
|
45
45
|
is_asserted_by { nml[:example].is_a? Hash }
|
46
46
|
is_asserted_by { nml[:example][:v1] == [1,2,3,4,5] }
|
@@ -55,7 +55,7 @@ describe "FortIO::Namelist" do
|
|
55
55
|
v2(3:5) = 8,9,10,
|
56
56
|
/
|
57
57
|
}
|
58
|
-
nml = FortIO::Namelist.
|
58
|
+
nml = FortIO::Namelist.parse(input)
|
59
59
|
is_asserted_by { nml.has_key? :example }
|
60
60
|
is_asserted_by { nml[:example].is_a? Hash }
|
61
61
|
is_asserted_by { nml[:example][:v1] == [nil,2,nil,nil,5] }
|
@@ -68,7 +68,7 @@ describe "FortIO::Namelist" do
|
|
68
68
|
v1(2) = 2,3,4,5
|
69
69
|
/
|
70
70
|
}
|
71
|
-
nml = FortIO::Namelist.
|
71
|
+
nml = FortIO::Namelist.parse(input)
|
72
72
|
is_asserted_by { nml.has_key? :example }
|
73
73
|
is_asserted_by { nml[:example].is_a? Hash }
|
74
74
|
is_asserted_by { nml[:example][:v1] == [nil,2,3,4,5] }
|
@@ -83,7 +83,7 @@ describe "FortIO::Namelist" do
|
|
83
83
|
v4 = 5 * f
|
84
84
|
/
|
85
85
|
}
|
86
|
-
nml = FortIO::Namelist.
|
86
|
+
nml = FortIO::Namelist.parse(input)
|
87
87
|
is_asserted_by { nml.has_key? :example }
|
88
88
|
is_asserted_by { nml[:example].is_a? Hash }
|
89
89
|
is_asserted_by { nml[:example][:v1] == [2,2,2,2,2] }
|
@@ -98,7 +98,7 @@ describe "FortIO::Namelist" do
|
|
98
98
|
v1 = "a",'b',"c"
|
99
99
|
/
|
100
100
|
}
|
101
|
-
nml = FortIO::Namelist.
|
101
|
+
nml = FortIO::Namelist.parse(input)
|
102
102
|
is_asserted_by { nml.has_key? :example }
|
103
103
|
is_asserted_by { nml[:example].is_a? Hash }
|
104
104
|
is_asserted_by { nml[:example][:v1] == ["a","b","c"] }
|
@@ -110,7 +110,7 @@ describe "FortIO::Namelist" do
|
|
110
110
|
v1 = a, b, c
|
111
111
|
/
|
112
112
|
}
|
113
|
-
expect { FortIO::Namelist.
|
113
|
+
expect { FortIO::Namelist.parse(input) }.to raise_error(RuntimeError)
|
114
114
|
end
|
115
115
|
|
116
116
|
example "array of identifier 2" do
|
@@ -119,7 +119,7 @@ describe "FortIO::Namelist" do
|
|
119
119
|
v1 = a, 0_b, _c
|
120
120
|
/
|
121
121
|
}
|
122
|
-
nml = FortIO::Namelist.
|
122
|
+
nml = FortIO::Namelist.parse(input)
|
123
123
|
is_asserted_by { nml.has_key? :example }
|
124
124
|
is_asserted_by { nml[:example].is_a? Hash }
|
125
125
|
is_asserted_by { nml[:example][:v1] == ["a","0_b","_c"] }
|
@@ -131,7 +131,7 @@ describe "FortIO::Namelist" do
|
|
131
131
|
v1 = "a", b, "c"
|
132
132
|
/
|
133
133
|
}
|
134
|
-
expect { FortIO::Namelist.
|
134
|
+
expect { FortIO::Namelist.parse(input) }.to raise_error(RuntimeError)
|
135
135
|
end
|
136
136
|
|
137
137
|
example "don't permit to mix identifier and string in array stream 2" do
|
@@ -140,7 +140,7 @@ describe "FortIO::Namelist" do
|
|
140
140
|
v1 = a, "b", c
|
141
141
|
/
|
142
142
|
}
|
143
|
-
expect { FortIO::Namelist.
|
143
|
+
expect { FortIO::Namelist.parse(input) }.to raise_error(RuntimeError)
|
144
144
|
end
|
145
145
|
|
146
146
|
example "empty element" do
|
@@ -150,7 +150,7 @@ describe "FortIO::Namelist" do
|
|
150
150
|
v2 = , , 3, , 5
|
151
151
|
/
|
152
152
|
}
|
153
|
-
nml = FortIO::Namelist.
|
153
|
+
nml = FortIO::Namelist.parse(input)
|
154
154
|
is_asserted_by { nml.has_key? :example }
|
155
155
|
is_asserted_by { nml[:example].is_a? Hash }
|
156
156
|
is_asserted_by { nml[:example][:v1] == [nil, nil, 3, nil, 5] }
|
data/spec/empty_spec.rb
CHANGED
@@ -8,7 +8,7 @@ describe "FortIO::Namelist" do
|
|
8
8
|
&example
|
9
9
|
&end
|
10
10
|
}
|
11
|
-
nml = FortIO::Namelist.
|
11
|
+
nml = FortIO::Namelist.parse(input)
|
12
12
|
is_asserted_by { nml.has_key? :example }
|
13
13
|
is_asserted_by { nml[:example].is_a? Hash }
|
14
14
|
is_asserted_by { nml[:example].empty? }
|
@@ -19,7 +19,7 @@ describe "FortIO::Namelist" do
|
|
19
19
|
$example
|
20
20
|
$end
|
21
21
|
}
|
22
|
-
nml = FortIO::Namelist.
|
22
|
+
nml = FortIO::Namelist.parse(input)
|
23
23
|
is_asserted_by { nml.has_key? :example }
|
24
24
|
end
|
25
25
|
|
@@ -28,7 +28,7 @@ $end
|
|
28
28
|
&example
|
29
29
|
/
|
30
30
|
}
|
31
|
-
nml = FortIO::Namelist.
|
31
|
+
nml = FortIO::Namelist.parse(input)
|
32
32
|
is_asserted_by { nml.has_key? :example }
|
33
33
|
end
|
34
34
|
|
@@ -38,10 +38,11 @@ $end
|
|
38
38
|
! this is comment
|
39
39
|
/
|
40
40
|
}
|
41
|
-
nml = FortIO::Namelist.
|
41
|
+
nml = FortIO::Namelist.parse(input)
|
42
42
|
is_asserted_by { nml.has_key? :example }
|
43
43
|
end
|
44
44
|
|
45
|
+
|
45
46
|
example "only newlines" do
|
46
47
|
input = %{
|
47
48
|
&example
|
@@ -49,7 +50,7 @@ $end
|
|
49
50
|
|
50
51
|
/
|
51
52
|
}
|
52
|
-
nml = FortIO::Namelist.
|
53
|
+
nml = FortIO::Namelist.parse(input)
|
53
54
|
is_asserted_by { nml.has_key? :example }
|
54
55
|
end
|
55
56
|
|
@@ -57,7 +58,7 @@ $end
|
|
57
58
|
input = %{
|
58
59
|
&example /
|
59
60
|
}
|
60
|
-
nml = FortIO::Namelist.
|
61
|
+
nml = FortIO::Namelist.parse(input)
|
61
62
|
is_asserted_by { nml.has_key? :example }
|
62
63
|
end
|
63
64
|
|
data/spec/identifier_spec.rb
CHANGED
@@ -11,7 +11,7 @@ describe "FortIO::Namelist" do
|
|
11
11
|
abc = 1
|
12
12
|
/
|
13
13
|
}
|
14
|
-
nml = FortIO::Namelist.
|
14
|
+
nml = FortIO::Namelist.parse(input)
|
15
15
|
is_asserted_by { nml.has_key? :example }
|
16
16
|
is_asserted_by { nml[:example].is_a? Hash }
|
17
17
|
is_asserted_by { nml[:example].keys.size == 3 }
|
@@ -26,7 +26,7 @@ describe "FortIO::Namelist" do
|
|
26
26
|
abc123 = 1
|
27
27
|
/
|
28
28
|
}
|
29
|
-
nml = FortIO::Namelist.
|
29
|
+
nml = FortIO::Namelist.parse(input)
|
30
30
|
is_asserted_by { nml.has_key? :example }
|
31
31
|
is_asserted_by { nml[:example].is_a? Hash }
|
32
32
|
is_asserted_by { nml[:example].keys.size == 3 }
|
@@ -41,7 +41,7 @@ describe "FortIO::Namelist" do
|
|
41
41
|
abc_123 = 1
|
42
42
|
/
|
43
43
|
}
|
44
|
-
nml = FortIO::Namelist.
|
44
|
+
nml = FortIO::Namelist.parse(input)
|
45
45
|
is_asserted_by { nml.has_key? :example }
|
46
46
|
is_asserted_by { nml[:example].is_a? Hash }
|
47
47
|
is_asserted_by { nml[:example].keys.size == 3 }
|
@@ -54,7 +54,7 @@ describe "FortIO::Namelist" do
|
|
54
54
|
1a = 1
|
55
55
|
/
|
56
56
|
}
|
57
|
-
expect { FortIO::Namelist.
|
57
|
+
expect { FortIO::Namelist.parse(input) }.to raise_error(RuntimeError)
|
58
58
|
end
|
59
59
|
|
60
60
|
example "can't start with underscore" do
|
@@ -63,7 +63,7 @@ describe "FortIO::Namelist" do
|
|
63
63
|
_a = 1
|
64
64
|
/
|
65
65
|
}
|
66
|
-
expect { FortIO::Namelist.
|
66
|
+
expect { FortIO::Namelist.parse(input) }.to raise_error(RuntimeError)
|
67
67
|
end
|
68
68
|
|
69
69
|
example "t and f can be used as indentifier" do
|
@@ -73,7 +73,7 @@ describe "FortIO::Namelist" do
|
|
73
73
|
f = 2
|
74
74
|
/
|
75
75
|
}
|
76
|
-
nml = FortIO::Namelist.
|
76
|
+
nml = FortIO::Namelist.parse(input)
|
77
77
|
is_asserted_by { nml[:example][:t] == 1 }
|
78
78
|
is_asserted_by { nml[:example][:f] == 2 }
|
79
79
|
end
|
data/spec/scalar_spec.rb
CHANGED
@@ -12,7 +12,7 @@ describe "FortIO::Namelist" do
|
|
12
12
|
v4 = -01
|
13
13
|
/
|
14
14
|
}
|
15
|
-
nml = FortIO::Namelist.
|
15
|
+
nml = FortIO::Namelist.parse(input)
|
16
16
|
is_asserted_by { nml.has_key? :example }
|
17
17
|
is_asserted_by { nml[:example].is_a? Hash }
|
18
18
|
is_asserted_by { nml[:example][:v1] == 1 }
|
@@ -35,7 +35,7 @@ describe "FortIO::Namelist" do
|
|
35
35
|
v9 = 90.0d-01
|
36
36
|
/
|
37
37
|
}
|
38
|
-
nml = FortIO::Namelist.
|
38
|
+
nml = FortIO::Namelist.parse(input)
|
39
39
|
is_asserted_by { nml.has_key? :example }
|
40
40
|
is_asserted_by { nml[:example].is_a? Hash }
|
41
41
|
is_asserted_by { nml[:example][:v1] == 1.0 }
|
@@ -63,7 +63,7 @@ describe "FortIO::Namelist" do
|
|
63
63
|
v9 = -90.0d-01
|
64
64
|
/
|
65
65
|
}
|
66
|
-
nml = FortIO::Namelist.
|
66
|
+
nml = FortIO::Namelist.parse(input)
|
67
67
|
is_asserted_by { nml.has_key? :example }
|
68
68
|
is_asserted_by { nml[:example].is_a? Hash }
|
69
69
|
is_asserted_by { nml[:example][:v1] == -1.0 }
|
@@ -83,7 +83,7 @@ describe "FortIO::Namelist" do
|
|
83
83
|
v1 = 01.0
|
84
84
|
/
|
85
85
|
}
|
86
|
-
nml = FortIO::Namelist.
|
86
|
+
nml = FortIO::Namelist.parse(input)
|
87
87
|
is_asserted_by { nml.has_key? :example }
|
88
88
|
is_asserted_by { nml[:example].is_a? Hash }
|
89
89
|
is_asserted_by { nml[:example][:v1] == 1.0 }
|
@@ -97,7 +97,7 @@ describe "FortIO::Namelist" do
|
|
97
97
|
v3 = string
|
98
98
|
/
|
99
99
|
}
|
100
|
-
nml = FortIO::Namelist.
|
100
|
+
nml = FortIO::Namelist.parse(input)
|
101
101
|
is_asserted_by { nml.has_key? :example }
|
102
102
|
is_asserted_by { nml[:example].is_a? Hash }
|
103
103
|
is_asserted_by { nml[:example][:v1] == "string" }
|
@@ -113,7 +113,7 @@ describe "FortIO::Namelist" do
|
|
113
113
|
v3 = 0_string
|
114
114
|
/
|
115
115
|
}
|
116
|
-
nml = FortIO::Namelist.
|
116
|
+
nml = FortIO::Namelist.parse(input)
|
117
117
|
is_asserted_by { nml.has_key? :example }
|
118
118
|
is_asserted_by { nml[:example].is_a? Hash }
|
119
119
|
is_asserted_by { nml[:example][:v1] == "string" }
|
@@ -132,7 +132,7 @@ describe "FortIO::Namelist" do
|
|
132
132
|
v6 = T
|
133
133
|
/
|
134
134
|
}
|
135
|
-
nml = FortIO::Namelist.
|
135
|
+
nml = FortIO::Namelist.parse(input)
|
136
136
|
is_asserted_by { nml.has_key? :example }
|
137
137
|
is_asserted_by { nml[:example].is_a? Hash }
|
138
138
|
is_asserted_by { nml[:example][:v1] == true }
|
@@ -154,7 +154,7 @@ describe "FortIO::Namelist" do
|
|
154
154
|
v6 = F
|
155
155
|
/
|
156
156
|
}
|
157
|
-
nml = FortIO::Namelist.
|
157
|
+
nml = FortIO::Namelist.parse(input)
|
158
158
|
is_asserted_by { nml.has_key? :example }
|
159
159
|
is_asserted_by { nml[:example].is_a? Hash }
|
160
160
|
is_asserted_by { nml[:example][:v1] == false }
|
@@ -172,7 +172,7 @@ describe "FortIO::Namelist" do
|
|
172
172
|
v2 = (1d0,1d0)
|
173
173
|
/
|
174
174
|
}
|
175
|
-
nml = FortIO::Namelist.
|
175
|
+
nml = FortIO::Namelist.parse(input)
|
176
176
|
is_asserted_by { nml.has_key? :example }
|
177
177
|
is_asserted_by { nml[:example].is_a? Hash }
|
178
178
|
is_asserted_by { nml[:example][:v1] == 1+1i }
|
@@ -186,7 +186,7 @@ describe "FortIO::Namelist" do
|
|
186
186
|
v2 = ,
|
187
187
|
/
|
188
188
|
}
|
189
|
-
nml = FortIO::Namelist.
|
189
|
+
nml = FortIO::Namelist.parse(input)
|
190
190
|
is_asserted_by { nml.has_key? :example }
|
191
191
|
is_asserted_by { nml[:example].is_a? Hash }
|
192
192
|
is_asserted_by { nml[:example][:v1] == "" }
|
data/spec/structure_spec.rb
CHANGED
@@ -11,7 +11,7 @@ describe "FortIO::Namelist" do
|
|
11
11
|
abc = 3
|
12
12
|
/
|
13
13
|
}
|
14
|
-
nml = FortIO::Namelist.
|
14
|
+
nml = FortIO::Namelist.parse(input)
|
15
15
|
is_asserted_by { nml.has_key? :example }
|
16
16
|
is_asserted_by { nml[:example].is_a? Hash }
|
17
17
|
is_asserted_by { nml[:example].keys.size == 3 }
|
@@ -23,7 +23,7 @@ describe "FortIO::Namelist" do
|
|
23
23
|
input = %{
|
24
24
|
&example a = 1 ab = 2 abc = 3 /
|
25
25
|
}
|
26
|
-
nml = FortIO::Namelist.
|
26
|
+
nml = FortIO::Namelist.parse(input)
|
27
27
|
is_asserted_by { nml.has_key? :example }
|
28
28
|
is_asserted_by { nml[:example].is_a? Hash }
|
29
29
|
is_asserted_by { nml[:example].keys.size == 3 }
|
@@ -37,7 +37,7 @@ describe "FortIO::Namelist" do
|
|
37
37
|
a = 1 ab = 2 abc = 3
|
38
38
|
/
|
39
39
|
}
|
40
|
-
nml = FortIO::Namelist.
|
40
|
+
nml = FortIO::Namelist.parse(input)
|
41
41
|
is_asserted_by { nml.has_key? :example }
|
42
42
|
is_asserted_by { nml[:example].is_a? Hash }
|
43
43
|
is_asserted_by { nml[:example].keys.size == 3 }
|
@@ -49,7 +49,7 @@ describe "FortIO::Namelist" do
|
|
49
49
|
input = %{
|
50
50
|
&example a = 1, ab = 2, abc = 3 /
|
51
51
|
}
|
52
|
-
nml = FortIO::Namelist.
|
52
|
+
nml = FortIO::Namelist.parse(input)
|
53
53
|
is_asserted_by { nml.has_key? :example }
|
54
54
|
is_asserted_by { nml[:example].is_a? Hash }
|
55
55
|
is_asserted_by { nml[:example].keys.size == 3 }
|
@@ -63,7 +63,7 @@ describe "FortIO::Namelist" do
|
|
63
63
|
a = 1, ab = 2, abc = 3
|
64
64
|
/
|
65
65
|
}
|
66
|
-
nml = FortIO::Namelist.
|
66
|
+
nml = FortIO::Namelist.parse(input)
|
67
67
|
is_asserted_by { nml.has_key? :example }
|
68
68
|
is_asserted_by { nml[:example].is_a? Hash }
|
69
69
|
is_asserted_by { nml[:example].keys.size == 3 }
|
@@ -79,7 +79,7 @@ describe "FortIO::Namelist" do
|
|
79
79
|
abc = 3
|
80
80
|
/
|
81
81
|
}
|
82
|
-
nml = FortIO::Namelist.
|
82
|
+
nml = FortIO::Namelist.parse(input)
|
83
83
|
is_asserted_by { nml.has_key? :example }
|
84
84
|
is_asserted_by { nml[:example].is_a? Hash }
|
85
85
|
is_asserted_by { nml[:example].keys.size == 3 }
|
@@ -95,7 +95,7 @@ describe "FortIO::Namelist" do
|
|
95
95
|
abc = 3,
|
96
96
|
/
|
97
97
|
}
|
98
|
-
nml = FortIO::Namelist.
|
98
|
+
nml = FortIO::Namelist.parse(input)
|
99
99
|
is_asserted_by { nml.has_key? :example }
|
100
100
|
is_asserted_by { nml[:example].is_a? Hash }
|
101
101
|
is_asserted_by { nml[:example].keys.size == 3 }
|
@@ -110,7 +110,7 @@ describe "FortIO::Namelist" do
|
|
110
110
|
abc = 3
|
111
111
|
/
|
112
112
|
}
|
113
|
-
nml = FortIO::Namelist.
|
113
|
+
nml = FortIO::Namelist.parse(input)
|
114
114
|
is_asserted_by { nml.has_key? :example }
|
115
115
|
is_asserted_by { nml[:example].is_a? Hash }
|
116
116
|
is_asserted_by { nml[:example].keys.size == 3 }
|
@@ -126,7 +126,7 @@ describe "FortIO::Namelist" do
|
|
126
126
|
abc =3
|
127
127
|
/
|
128
128
|
}
|
129
|
-
nml = FortIO::Namelist.
|
129
|
+
nml = FortIO::Namelist.parse(input)
|
130
130
|
is_asserted_by { nml.has_key? :example }
|
131
131
|
is_asserted_by { nml[:example].is_a? Hash }
|
132
132
|
is_asserted_by { nml[:example].keys.size == 3 }
|
@@ -150,7 +150,7 @@ describe "FortIO::Namelist" do
|
|
150
150
|
4
|
151
151
|
/
|
152
152
|
}
|
153
|
-
nml = FortIO::Namelist.
|
153
|
+
nml = FortIO::Namelist.parse(input)
|
154
154
|
is_asserted_by { nml.has_key? :example }
|
155
155
|
is_asserted_by { nml[:example].is_a? Hash }
|
156
156
|
is_asserted_by { nml[:example].keys.size == 4 }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fortio-namelist
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hiroki Motoyoshi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-03-
|
11
|
+
date: 2021-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: racc
|