diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-02-27 20:42:17 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-02-27 20:42:17 +0000 |
commit | 69949786a09933d2634c8f89f7ca0b32df3063a9 (patch) | |
tree | 6bfbe6a9f67a34161253d076d2de210c540c3f2b /t | |
parent | 680d89bf7a22e306c7efa08693807e150438cd20 (diff) | |
download | urpmi-69949786a09933d2634c8f89f7ca0b32df3063a9.tar urpmi-69949786a09933d2634c8f89f7ca0b32df3063a9.tar.gz urpmi-69949786a09933d2634c8f89f7ca0b32df3063a9.tar.bz2 urpmi-69949786a09933d2634c8f89f7ca0b32df3063a9.tar.xz urpmi-69949786a09933d2634c8f89f7ca0b32df3063a9.zip |
(system_should_fail) on some error questions ("Do you want to...
(y/N)?"), urpmi doesn't output "\n", which breaks parsing:
t/superuser--handle-conflict-deps2.t ............................
Failed 2/18 subtests
(...)
Test Summary Report
-------------------
t/superuser--handle-conflict-deps2.t (Wstat: 0 Tests: 16 Failed: 0)
Parse errors: Tests out of sequence. Found (6) but expected (5)
Tests out of sequence. Found (7) but expected (6)
Tests out of sequence. Found (8) but expected (7)
Tests out of sequence. Found (9) but expected (8)
Tests out of sequence. Found (10) but expected (9)
Displayed the first 5 of 13 TAP syntax errors.
Re-run prove with the -p option to see them all.
eg:
Continue installation anyway? (Y/n) ok 5 - should fail: echo n | perl -I.. ../urpmi --urpmi-root /urpmi/t/root -q c-2 d1-2
Diffstat (limited to 't')
-rw-r--r-- | t/helper.pm | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/t/helper.pm b/t/helper.pm index a7959dae..e3c3a008 100644 --- a/t/helper.pm +++ b/t/helper.pm @@ -109,6 +109,8 @@ sub system_ { sub system_should_fail { my ($cmd) = @_; system($cmd); + # on some error questions ("Do you want to... (y/N)?"), urpmi doesn't output "\n": + print "\n"; $? & 127 ? is($? & 127, 0, "should fail nicely but not get killed: $cmd") : ok($? != 0, "should fail: $cmd"); } |