beyondgrep / ack2

**ack 2 is no longer being maintained. ack 3 is the latest version.**
https://github.com/beyondgrep/ack3/
Other
1.48k stars 140 forks source link

Failed 6/86 tests on Win32 / Strawberry 5.19.11 ( Path slashes mostly to blame? ) #457

Closed kentfredric closed 10 years ago

kentfredric commented 10 years ago

I looked around and couldn't find any existing bugs that looked quite like what I was seeing.

Some of these failures are string comparison missmatches due to path slashes changing direction:

#          $got->[0] = 't\text\4th-of-july.txt'
#     $expected->[0] = 't/text/4th-of-july.txt'
Test Summary Report
-------------------
t/ack-g.t                  (Wstat: 256 Tests: 18 Failed: 1)
  Failed test:  17
  Non-zero exit status: 1
t/ack-match.t              (Wstat: 1280 Tests: 15 Failed: 5)
  Failed tests:  11-15
  Non-zero exit status: 5
t/ack-o.t                  (Wstat: 1280 Tests: 13 Failed: 5)
  Failed tests:  9-13
  Non-zero exit status: 5
t/config-finder.t          (Wstat: 512 Tests: 0 Failed: 0)
  Non-zero exit status: 2
  Parse errors: Bad plan.  You planned 26 tests but ran 0.
t/highlighting.t           (Wstat: 768 Tests: 6 Failed: 3)
  Failed tests:  2, 4, 6
  Non-zero exit status: 3
t/noenv.t                  (Wstat: 512 Tests: 1 Failed: 1)
  Failed test:  1
  Non-zero exit status: 2
  Parse errors: Bad plan.  You planned 5 tests but ran 1.
Files=86, Tests=871, 126 wallclock secs ( 0.53 usr +  0.03 sys =  0.56 CPU)
Result: FAIL

Excerpted Failures

Full log

ack-g.t

    #   Failed test 'Colorizing -g output with --color should work'
    #   at t/ack-g.t line 268.
    #     Structures begin differing at:
    #          $got->[0] = 't\context.t'
    #     $expected->[0] = 't/context.t'
    # Looks like you failed 1 test of 2.

#   Failed test 'test -g with --color'
#   at t/ack-g.t line 269.
# Looks like you failed 1 test of 18.
t/ack-g.t .................... 

ack-match.t

#   Failed test at t/ack-match.t line 52.
#                   'Can't use string ("C:\ProgramData\ackrc") as a HASH ref while "strict refs" in use at C:\Users\Kent\.cpanm\work\1399122924.3796\ack-2.12\blib\lib/App/Ack/ConfigLoader.pm line 738.'
#     doesn't match '(?^:--match is illegal in project ackrcs)'
# [
#   'Can\'t use string ("C:\\ProgramData\\ackrc") as a HASH ref while "strict refs" in use at C:\\Users\\Kent\\.cpanm\\work\\1399122924.3796\\ack-2.12\\blib\\lib/App/Ack/ConfigLoader.pm line 738.'
# ]

#   Failed test at t/ack-match.t line 67.
# []

#   Failed test at t/ack-match.t line 68.
# [
#   'Can\'t use string ("C:\\ProgramData\\ackrc") as a HASH ref while "strict refs" in use at C:\\Users\\Kent\\.cpanm\\work\\1399122924.3796\\ack-2.12\\blib\\lib/App/Ack/ConfigLoader.pm line 738.'
# ]

#   Failed test at t/ack-match.t line 83.
# []

#   Failed test at t/ack-match.t line 84.
# [
#   'Can\'t use string ("C:\\ProgramData\\ackrc") as a HASH ref while "strict refs" in use at C:\\Users\\Kent\\.cpanm\\work\\1399122924.3796\\ack-2.12\\blib\\lib/App/Ack/ConfigLoader.pm line 738.'
# ]
# Looks like you failed 5 tests of 15.
t/ack-match.t ................ 

ack-o.t


#   Failed test at t/ack-o.t line 115.
#                   'Can't use string ("C:\ProgramData\ackrc") as a HASH ref while "strict refs" in use at C:\Users\Kent\.cpanm\work\1399122924.3796\ack-2.12\blib\lib/App/Ack/ConfigLoader.pm line 738.'
#     doesn't match '(?^:--output is illegal in project ackrcs)'
# [
#   'Can\'t use string ("C:\\ProgramData\\ackrc") as a HASH ref while "strict refs" in use at C:\\Users\\Kent\\.cpanm\\work\\1399122924.3796\\ack-2.12\\blib\\lib/App/Ack/ConfigLoader.pm line 738.'
# ]

#   Failed test at t/ack-o.t line 130.
# []

#   Failed test at t/ack-o.t line 131.
# [
#   'Can\'t use string ("C:\\ProgramData\\ackrc") as a HASH ref while "strict refs" in use at C:\\Users\\Kent\\.cpanm\\work\\1399122924.3796\\ack-2.12\\blib\\lib/App/Ack/ConfigLoader.pm line 738.'
# ]

#   Failed test at t/ack-o.t line 146.
# []

#   Failed test at t/ack-o.t line 147.
# [
#   'Can\'t use string ("C:\\ProgramData\\ackrc") as a HASH ref while "strict refs" in use at C:\\Users\\Kent\\.cpanm\\work\\1399122924.3796\\ack-2.12\\blib\\lib/App/Ack/ConfigLoader.pm line 738.'
# ]
# Looks like you failed 5 tests of 13.
t/ack-o.t .................... 

config-finder.t

Can't use string ("C:\ProgramData\ackrc") as a HASH ref while "strict refs" in use at t/config-finder.t line 89.
cannot remove path when cwd is C:/Users/Kent/AppData/Local/Temp/BlldvItcMu for C:/Users/Kent/AppData/Local/Temp/BlldvItcMu:  at C:/strawberry-5.19.11/perl/lib/File/Temp.pm line 1616.
# Looks like your test exited with 2 before it could output anything.
t/config-finder.t ............ 

highlighting.t

#   Failed test 'Basic highlights match'
#   at t/highlighting.t line 28.
#     Structures begin differing at:
#          $got->[0] = 't\text\science-of-myth.txt'
#     $expected->[0] = 't/text/science-of-myth.txt'

#   Failed test 'Metacharacters match'
#   at t/highlighting.t line 49.
#     Structures begin differing at:
#          $got->[0] = 't\text\4th-of-july.txt'
#     $expected->[0] = 't/text/4th-of-july.txt'

#   Failed test 'Context is all good'
#   at t/highlighting.t line 70.
#     Structures begin differing at:
#          $got->[0] = 't\text\4th-of-july.txt'
#     $expected->[0] = 't/text/4th-of-july.txt'
# Looks like you failed 3 tests of 6.
t/highlighting.t ............. 

noenv.t

Can't use string ("C:\ProgramData\ackrc") as a HASH ref while "strict refs" in use at C:\Users\Kent\.cpanm\work\1399122924.3796\ack-2.12\blib\lib/App/Ack/ConfigLoader.pm line 738.
    # Child (without --noenv) exited without calling finalize()

#   Failed test 'without --noenv'
#   at C:/strawberry-5.19.11/perl/lib/Test/Builder.pm line 276.
cannot remove path when cwd is C:/Users/Kent/AppData/Local/Temp/csxevqs5xQ for C:/Users/Kent/AppData/Local/Temp/csxevqs5xQ:  at C:/strawberry-5.19.11/perl/lib/File/Temp.pm line 1616.
# Looks like you planned 5 tests but ran 1.
# Looks like you failed 1 test of 1 run.
# Looks like your test exited with 2 just after 1.
t/noenv.t .................... 
pdl commented 10 years ago

ack-g.t, and highlighting.t are duplicates of #420 ack-o.t, config-finder.t and noenv.t are duplicates of #436

kentfredric commented 10 years ago

I assume ack-match.t is also #436

If so I can close this and stalk the others.

pdl commented 10 years ago

Yep.