[Rt-commit] rt branch, 5.0/skip-links-html-formatter-tests, created. rt-5.0.0-222-g33b5b6443d
? sunnavy
sunnavy at bestpractical.com
Tue Jan 12 13:19:16 EST 2021
The branch, 5.0/skip-links-html-formatter-tests has been created
at 33b5b6443d492501f81266db0c665ab7f3733573 (commit)
- Log -----------------------------------------------------------------
commit 33b5b6443d492501f81266db0c665ab7f3733573
Author: sunnavy <sunnavy at bestpractical.com>
Date: Wed Jan 13 00:02:13 2021 +0800
Skip "links" html formatter tests if it's actually "elinks"
In OS like CentOS, "elinks" package also supplies "links" command:
/usr/bin/links -> /etc/alternatives/links
/etc/alternatives/links -> /usr/bin/elinks
Since HTML::FormatText::Links is for the real "links" command, tests
would fail if it's a fake one:
ELinks: Unknown option -width
diff --git a/t/mail/html-to-text.t b/t/mail/html-to-text.t
index 0268efed6d..1827ccedfc 100644
--- a/t/mail/html-to-text.t
+++ b/t/mail/html-to-text.t
@@ -84,6 +84,13 @@ sub test_conversion
skip "Skipping $converter: Not installed", 1;
return;
}
+ elsif ( $converter eq 'links' ) {
+ my $links = RT::Test->find_executable($converter);
+ if ( `$links -version` =~ /ELinks/ ) {
+ skip "Skipping $converter: it's not links but elinks", 1;
+ return;
+ }
+ }
RT->Config->Set(HTMLFormatter => $converter);
my $text = RT::Interface::Email::ConvertHTMLToText($html);
is($text, $expected, "Got expected HTML->text conversion using $converter");
-----------------------------------------------------------------------
More information about the rt-commit
mailing list