aboutsummaryrefslogtreecommitdiff
path: root/tests/runtests.pl
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-05-20 10:40:32 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-05-20 10:40:32 +0000
commit17ea2631cd081dff7380d0b960448d1414f64bd7 (patch)
treecbe8f78a3ceb4503d2161127bc223c2b96b2f5ba /tests/runtests.pl
parentb749910e6ca4288854ea40d2e0f74602678ba72f (diff)
Add support for text mode on stdout tests as well, and add the mode=text
to the docs.
Diffstat (limited to 'tests/runtests.pl')
-rwxr-xr-xtests/runtests.pl10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/runtests.pl b/tests/runtests.pl
index 0ba5d8bc1..765c38c83 100755
--- a/tests/runtests.pl
+++ b/tests/runtests.pl
@@ -1326,6 +1326,16 @@ sub singletest {
# verify redirected stdout
my @actual = loadarray($STDOUT);
+ # get all attributes
+ my %hash = getpartattr("verify", "stdout");
+
+ # get the mode attribute
+ my $filemode=$hash{'mode'};
+ if(($filemode eq "text") && $has_textaware) {
+ # text mode when running on windows: fix line endings
+ map s/\r\n/\n/g, @actual;
+ }
+
$res = compare("stdout", \@actual, \@validstdout);
if($res) {
return 1;