From 499dfe9acbcc5fab3518a92573a6ba2555f2d332 Mon Sep 17 00:00:00 2001 From: Ole Tange Date: Tue, 26 May 2015 00:08:31 +0200 Subject: [PATCH] testsuite: test quoting in all known shells. --- testsuite/tests-to-run/parallel-local-0.3s.sh | 11 +-- testsuite/wanted-results/parallel-local-0.3s | 67 ++++++++++++------- testsuite/wanted-results/parallel-tutorial | 10 +-- 3 files changed, 51 insertions(+), 37 deletions(-) diff --git a/testsuite/tests-to-run/parallel-local-0.3s.sh b/testsuite/tests-to-run/parallel-local-0.3s.sh index 2d4e86ec..38bb4c8b 100644 --- a/testsuite/tests-to-run/parallel-local-0.3s.sh +++ b/testsuite/tests-to-run/parallel-local-0.3s.sh @@ -160,14 +160,9 @@ parallel -k echo {#} ::: 1 2 ::: 1 2 echo '**' -printf '"#&/\n()*=?'"'" | PARALLEL_SHELL=bash parallel -0 echo -printf '"#&/\n()*=?'"'" | PARALLEL_SHELL=fish parallel -0 echo -printf '"#&/\n()*=?'"'" | PARALLEL_SHELL=ash parallel -0 echo -printf '"#&/\n()*=?'"'" | PARALLEL_SHELL=dash parallel -0 echo -printf '"#&/\n()*=?'"'" | PARALLEL_SHELL=sh parallel -0 echo -printf '"#&/\n()*=?'"'" | PARALLEL_SHELL=rc parallel -0 echo -printf '"#&/\n()*=?'"'" | PARALLEL_SHELL=csh parallel -0 echo -printf '"#&/\n()*=?'"'" | PARALLEL_SHELL=tcsh parallel -0 echo +testquote() { printf '"#&/\n()*=?'"'" | PARALLEL_SHELL=$1 parallel -0 echo; }; + export -f testquote; + parallel --tag -k testquote ::: ash bash csh dash fdsh fish fizsh ksh ksh93 mksh pdksh posh rbash rc rzsh sash sh static-sh tcsh yash zsh echo '**' diff --git a/testsuite/wanted-results/parallel-local-0.3s b/testsuite/wanted-results/parallel-local-0.3s index 3fc57f45..b396e7de 100644 --- a/testsuite/wanted-results/parallel-local-0.3s +++ b/testsuite/wanted-results/parallel-local-0.3s @@ -334,30 +334,49 @@ parallel -k echo {#} ::: 1 2 ::: 1 2 4 echo '**' ** -printf '"#&/\n()*=?'"'" | PARALLEL_SHELL=bash parallel -0 echo -"#&/ -()*=?' -printf '"#&/\n()*=?'"'" | PARALLEL_SHELL=fish parallel -0 echo -"#&/ -()*=?' -printf '"#&/\n()*=?'"'" | PARALLEL_SHELL=ash parallel -0 echo -"#&/ -()*=?' -printf '"#&/\n()*=?'"'" | PARALLEL_SHELL=dash parallel -0 echo -"#&/ -()*=?' -printf '"#&/\n()*=?'"'" | PARALLEL_SHELL=sh parallel -0 echo -"#&/ -()*=?' -printf '"#&/\n()*=?'"'" | PARALLEL_SHELL=rc parallel -0 echo -"#&/ -()*=?' -printf '"#&/\n()*=?'"'" | PARALLEL_SHELL=csh parallel -0 echo -"#&/ -()*=?' -printf '"#&/\n()*=?'"'" | PARALLEL_SHELL=tcsh parallel -0 echo -"#&/ -()*=?' +testquote() { printf '"#&/\n()*=?'"'" | PARALLEL_SHELL=$1 parallel -0 echo; }; export -f testquote; parallel --tag -k testquote ::: ash bash csh dash fdsh fish fizsh ksh ksh93 mksh pdksh posh rbash rc rzsh sash sh static-sh tcsh yash zsh +ash "#&/ +ash ()*=?' +bash "#&/ +bash ()*=?' +csh "#&/ +csh ()*=?' +dash "#&/ +dash ()*=?' +fdsh "#&/ +fdsh ()*=?' +fish "#&/ +fish ()*=?' +fizsh "#&/ +fizsh ()*=?' +ksh "#&/ +ksh ()*=?' +ksh93 "#&/ +ksh93 ()*=?' +mksh "#&/ +mksh ()*=?' +pdksh "#&/ +pdksh ()*=?' +posh "#&/ +posh ()*=?' +rbash "#&/ +rbash ()*=?' +rc "#&/ +rc ()*=?' +rzsh "#&/ +rzsh ()*=?' +sash "#&/ +sash ()*=?' +sh "#&/ +sh ()*=?' +static-sh "#&/ +static-sh ()*=?' +tcsh "#&/ +tcsh ()*=?' +yash "#&/ +yash ()*=?' +zsh "#&/ +zsh ()*=?' echo '**' ** ### 1 .par file from --files expected diff --git a/testsuite/wanted-results/parallel-tutorial b/testsuite/wanted-results/parallel-tutorial index a880f857..0d1be3da 100644 --- a/testsuite/wanted-results/parallel-tutorial +++ b/testsuite/wanted-results/parallel-tutorial @@ -614,7 +614,7 @@ foo 3 parallel --filter-hosts -S 173.194.32.46,$SERVER1 echo ::: bar bar -parallel: Warning: Removed 173.194.32.46 +parallel: Warning: Removed 173.194.32.46. parallel --onall -S $SERVER1,$SERVER2 echo ::: foo bar foo bar @@ -982,7 +982,7 @@ This helps funding further development; and it won't cost you a cent. If you pay 10000 EUR you should feel free to use GNU Parallel without citing. parallel --version -GNU parallel 20150522 +GNU parallel VERSION Copyright (C) 2007,2008,2009,2010,2011,2012,2013,2014,2015 Ole Tange and Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later @@ -993,9 +993,9 @@ Web site: http://www.gnu.org/software/parallel When using programs that use GNU Parallel to process data for publication please cite as described in 'parallel --bibtex'. - parallel --minversion 20130722 && echo Your version is at least 20130722. -20150522 -Your version is at least 20130722. + parallel --minversion VERSION && echo Your version is at least VERSION. +VERSION +Your version is at least VERSION. parallel --bibtex Academic tradition requires you to cite works you base your article on. When using programs that use GNU Parallel to process data for publication