Skip to content

@fd /output.txt
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
yajl-ruby parser bug.
(in /Users/Simon/Projects/json_select/t)
FF
Failures:
1) Parser should not swallow the first object after parsing a number(integer)
Failure/Error: ]
expected: ["foo", "bar", 42, "baz", "bax"]
got: ["foo", "bar", 42, "bax"] (using ==)
Diff:
@@ -1,2 +1,2 @@
-["foo", "bar", 42, "baz", "bax"]
+["foo", "bar", 42, "bax"]
# ./parser_spec.rb:23
2) Parser should not swallow the first object after parsing a number(float)
Failure/Error: ]
expected: ["foo", "bar", 41.9, "baz", "bax"]
got: ["foo", "bar", 41.9, "bax"] (using ==)
Diff:
@@ -1,2 +1,2 @@
-["foo", "bar", 41.9, "baz", "bax"]
+["foo", "bar", 41.9, "bax"]
# ./parser_spec.rb:44
Finished in 0.00263 seconds
2 examples, 2 failures
require 'yajl'
describe "Parser" do
it "should not swallow the first object after parsing a number(integer)" do
json_stream = <<-JSON
"foo"
"bar"
42
"baz"
"bax"
JSON
objects = []
Yajl::Parser.parse(json_stream) { |o| objects << o }
objects.should == [
"foo",
"bar",
42,
"baz",
"bax"
]
end
it "should not swallow the first object after parsing a number(float)" do
json_stream = <<-JSON
"foo"
"bar"
41.9
"baz"
"bax"
JSON
objects = []
Yajl::Parser.parse(json_stream) { |o| objects << o }
objects.should == [
"foo",
"bar",
41.9,
"baz",
"bax"
]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.