section.
</file>
-<stdin>
+<stdin [nonewline="yes"]>
Pass this given data on stdin to the tool.
+
+If 'nonewline' is set, we will cut off the trailing newline of this given data
+before comparing with the one actually received by the client
</stdin>
</client>
if(@stdintest) {
my $stdinfile="$LOGDIR/stdin-for-$testnum";
+
+ my %hash = getpartattr("client", "stdin");
+ if($hash{'nonewline'}) {
+ # cut off the final newline from the final line of the stdin data
+ chomp($stdintest[$#stdintest]);
+ }
+
writearray($stdinfile, \@stdintest);
$cmdargs .= " <$stdinfile";