Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spec testsuite fails on IBM s390x system for pcx file format #15

Closed
mtasaka opened this issue Aug 20, 2021 · 1 comment · Fixed by #16
Closed

spec testsuite fails on IBM s390x system for pcx file format #15

mtasaka opened this issue Aug 20, 2021 · 1 comment · Fixed by #16

Comments

@mtasaka
Copy link
Contributor

mtasaka commented Aug 20, 2021

image_size 2.1.1 sees spec testsuite failure on IBM s390x system for pcx file format. Note that s390x system is big endian:

........................
Failures:
  1) ImageSize for spec/images/pcx/70x60.pcx given as data gets format and dimensions
     Failure/Error: expect(image_size).to have_attributes(attributes)
       expected #<ImageSize:0x000002aa0b7a5dc0 @format=:pcx, @width=17665, @height=15105> to have attributes {:format => :pcx, :h => 60, :height => 60, :size => [70, 60], :w => 70, :width => 70} but had attributes {:format => :pcx, :h => 15105, :height => 15105, :size => [17665, 15105], :w => 17665, :width => 17665}
       Diff:
       @@ -1,7 +1,7 @@
        :format => :pcx,
       -:h => 60,
       -:height => 60,
       -:size => [70, 60],
       -:w => 70,
       -:width => 70,
       +:h => 15105,
       +:height => 15105,
       +:size => [17665, 15105],
       +:w => 17665,
       +:width => 17665,
     # ./spec/image_size_spec.rb:35:in `block (5 levels) in <top (required)>'
  2) ImageSize for spec/images/pcx/70x60.pcx given as IO gets format and dimensions
     Failure/Error: expect(image_size).to have_attributes(attributes)
       expected #<ImageSize:0x000002aa0b88cd10 @format=:pcx, @width=17665, @height=15105> to have attributes {:format => :pcx, :h => 60, :height => 60, :size => [70, 60], :w => 70, :width => 70} but had attributes {:format => :pcx, :h => 15105, :height => 15105, :size => [17665, 15105], :w => 17665, :width => 17665}
       Diff:
       @@ -1,7 +1,7 @@
        :format => :pcx,
       -:h => 60,
       -:height => 60,
       -:size => [70, 60],
       -:w => 70,
       -:width => 70,
       +:h => 15105,
       +:height => 15105,
       +:size => [17665, 15105],
       +:w => 17665,
       +:width => 17665,
     # ./spec/image_size_spec.rb:44:in `block (6 levels) in <top (required)>'
     # ./spec/image_size_spec.rb:42:in `open'
     # ./spec/image_size_spec.rb:42:in `block (5 levels) in <top (required)>'
  3) ImageSize for spec/images/pcx/70x60.pcx given as StringIO gets format and dimensions
     Failure/Error: expect(image_size).to have_attributes(attributes)
       expected #<ImageSize:0x000002aa0b8cfc28 @format=:pcx, @width=17665, @height=15105> to have attributes {:format => :pcx, :h => 60, :height => 60, :size => [70, 60], :w => 70, :width => 70} but had attributes {:format => :pcx, :h => 15105, :height => 15105, :size => [17665, 15105], :w => 17665, :width => 17665}
       Diff:
       @@ -1,7 +1,7 @@
        :format => :pcx,
       -:h => 60,
       -:height => 60,
       -:size => [70, 60],
       -:w => 70,
       -:width => 70,
       +:h => 15105,
       +:height => 15105,
       +:size => [17665, 15105],
       +:w => 17665,
       +:width => 17665,
     # ./spec/image_size_spec.rb:57:in `block (5 levels) in <top (required)>'
  4) ImageSize for spec/images/pcx/70x60.pcx given as Tempfile gets format and dimensions
     Failure/Error: expect(image_size).to have_attributes(attributes)
       expected #<ImageSize:0x000002aa0b8aa6f8 @format=:pcx, @width=17665, @height=15105> to have attributes {:format => :pcx, :h => 60, :height => 60, :size => [70, 60], :w => 70, :width => 70} but had attributes {:format => :pcx, :h => 15105, :height => 15105, :size => [17665, 15105], :w => 17665, :width => 17665}
       Diff:
       @@ -1,7 +1,7 @@
        :format => :pcx,
       -:h => 60,
       -:height => 60,
       -:size => [70, 60],
       -:w => 70,
       -:width => 70,
       +:h => 15105,
       +:height => 15105,
       +:size => [17665, 15105],
       +:w => 17665,
       +:width => 17665,
     # ./spec/image_size_spec.rb:72:in `block (6 levels) in <top (required)>'
     # ./spec/image_size_spec.rb:67:in `block (5 levels) in <top (required)>'
  5) ImageSize for spec/images/pcx/70x60.pcx using path method gets format and dimensions
     Failure/Error: expect(image_size).to have_attributes(attributes)
       expected #<ImageSize:0x000002aa0b8ed638 @format=:pcx, @width=17665, @height=15105> to have attributes {:format => :pcx, :h => 60, :height => 60, :size => [70, 60], :w => 70, :width => 70} but had attributes {:format => :pcx, :h => 15105, :height => 15105, :size => [17665, 15105], :w => 17665, :width => 17665}
       Diff:
       @@ -1,7 +1,7 @@
        :format => :pcx,
       -:h => 60,
       -:height => 60,
       -:size => [70, 60],
       -:w => 70,
       -:width => 70,
       +:h => 15105,
       +:height => 15105,
       +:size => [17665, 15105],
       +:w => 17665,
       +:width => 17665,
     # ./spec/image_size_spec.rb:84:in `block (5 levels) in <top (required)>'
Finished in 0.06602 seconds (files took 0.11639 seconds to load)
168 examples, 5 failures
Failed examples:
rspec ./spec/image_size_spec.rb[1:13:1:1] # ImageSize for spec/images/pcx/70x60.pcx given as data gets format and dimensions
rspec ./spec/image_size_spec.rb[1:13:2:1] # ImageSize for spec/images/pcx/70x60.pcx given as IO gets format and dimensions
rspec ./spec/image_size_spec.rb[1:13:3:1] # ImageSize for spec/images/pcx/70x60.pcx given as StringIO gets format and dimensions
rspec ./spec/image_size_spec.rb[1:13:4:1] # ImageSize for spec/images/pcx/70x60.pcx given as Tempfile gets format and dimensions
rspec ./spec/image_size_spec.rb[1:13:5:1] # ImageSize for spec/images/pcx/70x60.pcx using path method gets format and dimensions
mtasaka added a commit to mtasaka/image_size that referenced this issue Aug 20, 2021
@toy
Copy link
Owner

toy commented Aug 20, 2021

Thank you for reporting 👍

@toy toy closed this as completed in #16 Aug 21, 2021
toy pushed a commit that referenced this issue Aug 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants