Skip to content

Commit

Permalink
Use Adobe Illustrator as a sample file
Browse files Browse the repository at this point in the history
  • Loading branch information
qcam committed Oct 2, 2018
1 parent 0918876 commit 3409bb2
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
10 changes: 8 additions & 2 deletions test/saxy_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ defmodule SaxyTest do
data = File.read!("./test/support/fixture/complex.xml")
assert {:ok, state} = Saxy.parse_string(data, StackHandler, [])
assert length(state) == 79

data = File.read!("./test/support/fixture/illustrator.svg")
assert {:ok, state} = Saxy.parse_string(data, StackHandler, [])
assert length(state) == 12
end

test "parse_string/4 parses XML binary with multiple \":expand_entity\" strategy" do
Expand Down Expand Up @@ -64,13 +68,15 @@ defmodule SaxyTest do

stream = File.stream!("./test/support/fixture/food.xml", [], 200)
assert {:ok, state} = Saxy.parse_stream(stream, StackHandler, [])

assert length(state) == 74

stream = File.stream!("./test/support/fixture/complex.xml", [], 200)
assert {:ok, state} = Saxy.parse_stream(stream, StackHandler, [])

assert length(state) == 79

stream = File.stream!("./test/support/fixture/illustrator.svg", [], 5)
assert {:ok, state} = Saxy.parse_stream(stream, StackHandler, [])
assert length(state) == 12
end

test "parse_stream/3 parses normal stream" do
Expand Down
16 changes: 16 additions & 0 deletions test/support/fixture/illustrator.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3409bb2

Please sign in to comment.