nichtich / Catmandu-Importer-getJSON

Load JSON data via HTTP GET with Catmandu
https://metacpan.org/release/Catmandu-Importer-getJSON
Other
1 stars 4 forks source link

Test fails #10

Closed vpeil closed 9 years ago

vpeil commented 9 years ago

A test fails for this module. After forcing cpanm to install it, everything seems to work fine, and I really like it as a general "web importer".

Nevertheless, it would be more convenient to correct either the test or the module. (I have looked into the test but could not figure out.)

$ prove -lv t/10_import.t

t/10_import.t ..
ok 1 - URI
ok 2
ok 3 - URI::Template
not ok 4

#   Failed test at t/10_import.t line 16.
#     Structures begin differing at:
#          $got->[1] = 'http://example.%7Btdl%7D/%7B?tdl=com'
#     $expected->[1] = 'http://example.com/'
ok 5 - --from
not ok 6 - --dry

#   Failed test '--dry'
#   at t/10_import.t line 44.
#     Structures begin differing at:
#          $got->[0]{url} = 'http://example.%7Btdl%7D/?tdl=org'
#     $expected->[0]{url} = 'http://example.org/'
ok 7 - JSON array response
ok 8
ok 9 - array response 1/2
ok 10 - array response 2/2
1..10
# Looks like you failed 2 tests of 10.
Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/10 subtests

Test Summary Report
-------------------
t/10_import.t (Wstat: 512 Tests: 10 Failed: 2)
  Failed tests:  4, 6
  Non-zero exit status: 2
Files=1, Tests=10,  1 wallclock secs ( 0.02 usr  0.01 sys +  0.19 cusr  0.01 csys =  0.23 CPU)
Result: FAIL
pietsch commented 9 years ago

I encountered this issue independently from Vitali as it prevents Task::Catmandu from building. Hits me on Perl 5.20 but not 5.16.

pietsch commented 9 years ago

These tests fail with Perl 5.18, too.

pietsch commented 9 years ago

In summary, this test bug causes cpanm Task::Catmandu to fail on OpenSUSE 13.2, Debian Jessie and probably other recent distributions, too.

bayashi commented 9 years ago

It would be caused by URI::Template version. Pass: URI::Template 0.20 Fail: URI::Template 0.21

bayashi commented 9 years ago

I sent a pull request: https://github.com/nichtich/Catmandu-Importer-getJSON/pull/12

nichtich commented 9 years ago

Fixed in 0.42

vpeil commented 9 years ago

thanks! now installation works smoothly