edn-abnf 0.5.13 → 0.5.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/edn-abnf +11 -7
- data/edn-abnf.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 14d01eaa954b101a5d9b1a38cba3f8c26e5e6c6dbc8c18229c8d09fc8d03eb70
|
|
4
|
+
data.tar.gz: 6edb1eacbac4466bfcc4825880eae1c96c93a5af3d4a14cb5104a2c8d203ef98
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 154a66988a780298dace8e6604b2a7bac226944384c869981fcf181e41c873ae19ca31193349c1cc094aec49b84075da6c622cc0691d974823860329dce0a15c
|
|
7
|
+
data.tar.gz: 48a564790134c0d21ffc19beefff2456892e3472356c021f2e5181adc333e96ea63882046c56572dd7935a17e6f129e47b86161dc796f121697b53da5525eb0f
|
data/bin/edn-abnf
CHANGED
|
@@ -204,8 +204,9 @@ when :"decoder-test"
|
|
|
204
204
|
fail "Not a map" unless Hash === result
|
|
205
205
|
tests = result.delete("tests")
|
|
206
206
|
fail "tests not an array" unless Array === tests
|
|
207
|
-
|
|
208
|
-
|
|
207
|
+
failing_tests = result.delete("fail")
|
|
208
|
+
puts result.inspect << ", #{tests.size} tests"
|
|
209
|
+
if failing_tests
|
|
209
210
|
tests.each do |t|
|
|
210
211
|
encoded = t.delete("encoded")
|
|
211
212
|
fail t unless encoded
|
|
@@ -220,23 +221,26 @@ when :"decoder-test"
|
|
|
220
221
|
end
|
|
221
222
|
end
|
|
222
223
|
else
|
|
223
|
-
p result
|
|
224
224
|
tests.each do |t|
|
|
225
225
|
encoded = t.delete("encoded")
|
|
226
226
|
fail t unless encoded
|
|
227
|
-
roundtrip = t.delete("roundtrip")
|
|
228
|
-
fail "not implemented: roundtrip is #{roundtrip.inspect} in #{t.inspect}" if roundtrip
|
|
229
|
-
# p t
|
|
227
|
+
roundtrip = t.delete("roundtrip") { true } # default is true
|
|
230
228
|
decoded = t.delete("decoded") { :"no-decoded"}
|
|
231
229
|
fail "no decoded" if decoded == :"no-decoded"
|
|
232
230
|
begin
|
|
233
231
|
r = CBOR.decode(encoded)
|
|
234
232
|
if !r.cbor_same?(decoded)
|
|
235
|
-
puts "*** unexpected: #{r.inspect}
|
|
233
|
+
puts "*** unexpected: decoding #{r.inspect}, expected #{decoded.inspect} in #{t.inspect}"
|
|
236
234
|
end
|
|
237
235
|
rescue => e
|
|
238
236
|
puts "*** decode failure: #{e}"
|
|
239
237
|
end
|
|
238
|
+
if roundtrip
|
|
239
|
+
rt = CBOR.encode(decoded)
|
|
240
|
+
if rt != encoded
|
|
241
|
+
puts "*** unexpected: encoding #{rt.inspect}, expected #{encoded.inspect} in #{t.inspect}"
|
|
242
|
+
end
|
|
243
|
+
end
|
|
240
244
|
end
|
|
241
245
|
end
|
|
242
246
|
else
|
data/edn-abnf.gemspec
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Gem::Specification.new do |s|
|
|
2
2
|
s.name = "edn-abnf"
|
|
3
|
-
s.version = "0.5.
|
|
3
|
+
s.version = "0.5.14"
|
|
4
4
|
s.summary = "CBOR Extended Diagnostic Notation (EDN) implemented in ABNF"
|
|
5
5
|
s.description = %q{edn-abnf implements converters and miscellaneous tools for CBOR EDN's ABNF}
|
|
6
6
|
s.author = "Carsten Bormann"
|