From df204a69facdeb73d586d919cdd2dafbe5542a2b Mon Sep 17 00:00:00 2001 From: Ole Tange Date: Tue, 30 Jul 2013 23:15:40 +0200 Subject: [PATCH] Test suite for bug #39554: Feature request: line buffered output. --- testsuite/tests-to-run/parallel-local23.sh | 19 ++++++++++++++----- testsuite/wanted-results/parallel-local23 | 16 ++++++++++++++++ 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/testsuite/tests-to-run/parallel-local23.sh b/testsuite/tests-to-run/parallel-local23.sh index 0615f49b..d4e57e18 100755 --- a/testsuite/tests-to-run/parallel-local23.sh +++ b/testsuite/tests-to-run/parallel-local23.sh @@ -2,12 +2,21 @@ rm -rf tmp 2>/dev/null cp -a input-files/testdir2 tmp -cd tmp -echo '### Test filenames containing UTF-8' -find . -name '*.jpg' | parallel -j +0 convert -geometry 120 {} {//}/thumb_{/} +cat <<'EOF' | sed -e 's/;$/; /;s/$SERVER1/'$SERVER1'/;s/$SERVER2/'$SERVER2'/' | stdout parallel -j0 -k -L1 +echo '### Test filenames containing UTF-8'; + cd tmp; + find . -name '*.jpg' | parallel -j +0 convert -geometry 120 {} {//}/thumb_{/}; + find |grep -v CVS | sort; -find |grep -v CVS | sort +echo '### bug #39554: Feature request: line buffered output'; + parallel -j0 --linebuffer 'echo -n start {};sleep 0.{#};echo middle -n {};sleep 1.{#}5;echo next to last {};sleep 1.{#};echo -n last {}' ::: A B C +echo + +echo '### bug #39554: Feature request: line buffered output --tag'; + parallel --tag -j0 --linebuffer 'echo -n start {};sleep 0.{#};echo middle -n {};sleep 1.{#}5;echo next to last {};sleep 1.{#};echo -n last {}' ::: A B C +echo + +EOF -cd .. rm -rf tmp diff --git a/testsuite/wanted-results/parallel-local23 b/testsuite/wanted-results/parallel-local23 index 213ceba1..1422ac71 100644 --- a/testsuite/wanted-results/parallel-local23 +++ b/testsuite/wanted-results/parallel-local23 @@ -12,3 +12,19 @@ ./中国 (Zhōngguó) ./中国 (Zhōngguó)/China's (中国) road.jpg ./中国 (Zhōngguó)/thumb_China's (中国) road.jpg +### bug #39554: Feature request: line buffered output +start Amiddle -n A +start Bmiddle -n B +start Cmiddle -n C +next to last A +next to last B +next to last C +last Alast Blast C +### bug #39554: Feature request: line buffered output --tag +A start Amiddle -n A +B start Bmiddle -n B +C start Cmiddle -n C +A next to last A +B next to last B +C next to last C +A last AB last BC last C