Ticket #1459 (closed defect: fixed)
Test t/11_svn.t and t/12_mime.t fail
| Reported by: | bojinlund | Owned by: | tome, bennie |
|---|---|---|---|
| Priority: | minor | Milestone: | |
| Component: | OSX | Version: | 0.97 |
| Keywords: | Cc: |
Description
I have downloaded http://svn.perlide.org/padre/trunk/Padre.
The test t/11_svn.t and t/12_mime.t fail when running "dmake test" in the downloaded file structure.
I have a .svn directory, but no .svn/props or .svn/prop-base directories.
See the patch for proposed changes.
Padre 0.97
Core...
osname MSWin32
archname MSWin32-x64-multi-thread
Perl 5.16.2
Threads 2
RAM 108.7MB
Wx...
Wx 0.9914
WxWidgets 2.8.12
unicode 1
Alien::wxWidgets 0.62
Wx::Perl::ProcessStream 0.32
Wx::Scintilla 0.39
Other...
PPI 1.215
Debug::Client 0.20
PPIx::EditorTools 0.18
Config T:\padre\.padre
Attachments
Change History
comment:1 Changed 6 months ago by bowtie
- Owner set to tome, bennie
- Status changed from new to assigned
- Component changed from not classified yet to OSX
comment:2 Changed 6 months ago by bowtie
bojinlund
you should be using Debug::Client 0.21_12 against trunk
http://cpan.metacpan.org/authors/id/B/BO/BOWTIE/Debug-Client-0.21_12.tar.gz
regards
comment:4 follow-up: ↓ 5 Changed 4 months ago by bowtie
bojinlund
I added a skip to test t/11_svn.t as the .svn/prop-base is no-longer in svn 1.7.x
as for t/12_mime.t passes here ubuntu 12.10 with perl 5.16.2
please add a
prove -lv t/12_mime.t
output here so that we can see the issue
ps should be using Debug::Client 0.21_15 against trunk now
thanks for feedback :)
comment:5 in reply to: ↑ 4 Changed 4 months ago by bojinlund
Replying to bowtie:
bowtie
My padre/.svn contains the files: entries, format and wc.db.
It also contains the directories: pristine and tmp.
In t/11_svn.t Padre::SVN::find_props($t) returns undef. The function find_props expects the files .svn/props or .svn/prop-base.
This results in:
# Failed test 'Found property file ' # at t/11_svn.t line 31. Failed to open '' at T:\padre\blib\lib/Padre/SVN.pm line 46.
And a number of secondary failures.
The test 12_mime.t gives the output:
# Failed test '->detect(zerolengthsvn)' # at t/12_mime.t line 75. # got: 'text/plain' # expected: 'application/x-perl' # Looks like you failed 1 test of 758. t/12_mime.t ................ Dubious, test returned 1 (wstat 256, 0x100) Failed 1/758 subtests (less 3 skipped subtests: 754 okay)
comment:6 follow-up: ↓ 7 Changed 4 months ago by bowtie
Hi bojinlund
are you running the latest release of trunk r19662 with the modified t/11_svn.t
also what is your svn version
please attach the output of against padre trunk r19662 or newer
prove -lv t/12_mime.t
as for t/12_mime.t you will need to add the output of that also, either in a text block or as an attached file
Changed 4 months ago by bojinlund
- Attachment prove_12_mime.t_log.txt added
Output from prove -lv t/12_mime.t
comment:7 in reply to: ↑ 6 Changed 4 months ago by bojinlund
Replying to bowtie:
Hej bowtie!
are you running the latest release of trunk r19662 with the modified t/11_svn.t
Yes.
also what is your svn version
TortoiseSVN 1.7.11, Build 23600 - 64 Bit , 2012/12/12 19:08:52 Subversion 1.7.8, apr 1.4.6 apr-utils 1.3.12 neon 0.29.6 OpenSSL 1.0.1c 10 May 2012 zlib 1.2.7
please attach the output of against padre trunk r19662 or newer
prove -lv t/12_mime.tas for t/12_mime.t you will need to add the output of that also, either in a text block or as an attached file
See the attached file: prove_12_mime.t_log.txt
comment:8 Changed 4 months ago by bowtie
bojinlund have you got your patch applied?
as I get
ok 755 # skip Not an SVN checkout
ok 756 # skip Not an SVN checkout
ok 757 # skip Not an SVN checkout
ok 758 - no warnings
ok
All tests successful.
but if I hack 12_mime.t
like so
# Detect the mime type using svn metadata
SKIP: {
skip( "Not an SVN checkout", 3 ) unless -e '.svn' -e '../.svn';
I then get the same error
ok 756 - ->detect(zerolengthsvn)
not ok 757 - ->detect(zerolengthsvn)
ok 758 - no warnings
# Failed test '->detect(zerolengthsvn)'
# at t/12_mime.t line 75.
# got: 'text/plain'
# expected: 'application/x-perl'
# Looks like you failed 1 test of 758.
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/758 subtests
(less 3 skipped subtests: 754 okay)
Test Summary Report
so I ask have you got the patch.txt applied
comment:10 in reply to: ↑ 9 Changed 4 months ago by bojinlund
Replying to bowtie:
Hej bowtie!
have you got your patch applied?
No.
try r19663
tweak to 12_mime.t
I do NOT have svn in PATH!!
I modified t/11_svn.t (from r19663) :
Changed:
use Test::NoWarnings; => #use Test::NoWarnings;
added:
warn File::Which::which('svn');
warn Padre::Util::SVN::local_svn_ver();
I am getting the output:
prove -lv t/m11_svn.t Warning: something's wrong at t/m11_svn.t line 22. 0 at t/m11_svn.t line 23. Use of uninitialized value $file in -f at t/m11_svn.t line 33. Use of uninitialized value $file in concatenation (.) or string at t/m11_svn.t line 33. # Failed test 'Found property file ' # at t/m11_svn.t line 33. Use of uninitialized value $file in open at T:\padre\lib/Padre/SVN.pm line 46. Use of uninitialized value $file in concatenation (.) or string at T:\padre\lib/Padre/SVN.pm line 46. Failed to open '' at T:\padre\lib/Padre/SVN.pm line 46. # Looks like you planned 4 tests but ran 2. # Looks like you failed 1 test of 2 run. # Looks like your test exited with 2 just after 2. t/m11_svn.t .. 1..4 ok 1 - Found file t\11_svn.t not ok 2 - Found property file Dubious, test returned 2 (wstat 512, 0x200) Failed 3/4 subtests Test Summary Report ------------------- t/m11_svn.t (Wstat: 512 Tests: 2 Failed: 1) Failed test: 2 Non-zero exit status: 2 Parse errors: Bad plan. You planned 4 tests but ran 2. Files=1, Tests=2, 1 wallclock secs ( 0.03 usr + 0.01 sys = 0.05 CPU) Result: FAIL
The skip is NOT done when svn is NOT in the PATH!
!File::Which::which('svn') could be used to also skip the tests in this case.
comment:11 follow-up: ↓ 12 Changed 4 months ago by bowtie
comment:12 in reply to: ↑ 11 Changed 4 months ago by bojinlund
Replying to bowtie:
Hej bowtie!
The patch in the attached file patch2.txt adds in t/11_svn.t and t/12_mime.t,
skip( 'svn not in PATH', 3 ) unless File::Which::which('svn');
It handles the case when there is an SVN checkout, but svn is not in the PATH.
Probably
use File::Which;
should also be added.
comment:13 Changed 3 days ago by bowtie
see also #1504
comment:14 Changed 3 days ago by bowtie
fixed in r19762
comment:15 Changed 3 days ago by bowtie
- Status changed from assigned to closed
- Resolution set to fixed

Patch