mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-22 14:07:55 +00:00
testsuite: Special char file and dir transfer return and cleanup.
This commit is contained in:
parent
649e2ec7c3
commit
92e65305df
|
@ -7418,7 +7418,6 @@ sub replaced {
|
|||
my $regexp = join('|', map { my $s = $_; $s =~ s/(\W)/\\$1/g; $s }
|
||||
sort { length $b <=> length $a } keys %replace);
|
||||
for(@target) {
|
||||
# ::debug("replace","Replace in ",::my_dump($_));
|
||||
s/($regexp)/join(" ",@{$replace{$1}})/ge;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,4 +35,23 @@ echo '### --hostgroup -S @group1+grp2'
|
|||
echo '### trailing space in sshlogin'
|
||||
echo 'sshlogin trailing space' | parallel --sshlogin "ssh -l parallel localhost " echo
|
||||
|
||||
echo '### Special char file and dir transfer return and cleanup'
|
||||
cd /tmp;
|
||||
mkdir -p d"`perl -e 'print pack("c*",1..9,11..46,48..255)'`";
|
||||
echo local > d"`perl -e 'print pack("c*",1..9,11..46,48..255)'`"/f"`perl -e 'print pack("c*",1..9,11..46,48..255)'`";
|
||||
ssh parallel@lo rm -rf d'*'/;
|
||||
mytouch() {
|
||||
cat d"`perl -e 'print pack("c*",1..9,11..46,48..255)'`"/f"`perl -e 'print pack("c*",1..9,11..46,48..255)'`" > d"`perl -e 'print pack("c*",1..9,11..46,48..255)'`"/g"`perl -e 'print pack("c*",1..9,11..46,48..255)'`";
|
||||
echo remote OK >> d"`perl -e 'print pack("c*",1..9,11..46,48..255)'`"/g"`perl -e 'print pack("c*",1..9,11..46,48..255)'`";
|
||||
};
|
||||
export -f mytouch;
|
||||
parallel --env mytouch -Sparallel@lo --transfer
|
||||
--return d"`perl -e 'print pack("c*",1..9,11..46,48..255)'`"/g"`perl -e 'print pack("c*",1..9,11..46,48..255)'`"
|
||||
mytouch
|
||||
::: d"`perl -e 'print pack("c*",1..9,11..46,48..255)'`"/f"`perl -e 'print pack("c*",1..9,11..46,48..255)'`";
|
||||
cat d"`perl -e 'print pack("c*",1..9,11..46,48..255)'`"/g"`perl -e 'print pack("c*",1..9,11..46,48..255)'`";
|
||||
|
||||
|
||||
# Should be changed to --return '{=s:/f:/g:=}' and tested with csh
|
||||
|
||||
EOF
|
||||
|
|
|
@ -91,3 +91,8 @@ echo '### trailing space in sshlogin'
|
|||
### trailing space in sshlogin
|
||||
echo 'sshlogin trailing space' | parallel --sshlogin "ssh -l parallel localhost " echo
|
||||
sshlogin trailing space
|
||||
echo '### Special char file and dir transfer return and cleanup'
|
||||
### Special char file and dir transfer return and cleanup
|
||||
cd /tmp; mkdir -p d"`perl -e 'print pack("c*",1..9,11..46,48..255)'`"; echo local > d"`perl -e 'print pack("c*",1..9,11..46,48..255)'`"/f"`perl -e 'print pack("c*",1..9,11..46,48..255)'`"; ssh parallel@lo rm -rf d'*'/; mytouch() { cat d"`perl -e 'print pack("c*",1..9,11..46,48..255)'`"/f"`perl -e 'print pack("c*",1..9,11..46,48..255)'`" > d"`perl -e 'print pack("c*",1..9,11..46,48..255)'`"/g"`perl -e 'print pack("c*",1..9,11..46,48..255)'`"; echo remote OK >> d"`perl -e 'print pack("c*",1..9,11..46,48..255)'`"/g"`perl -e 'print pack("c*",1..9,11..46,48..255)'`"; }; export -f mytouch; parallel --env mytouch -Sparallel@lo --transfer --return d"`perl -e 'print pack("c*",1..9,11..46,48..255)'`"/g"`perl -e 'print pack("c*",1..9,11..46,48..255)'`" mytouch ::: d"`perl -e 'print pack("c*",1..9,11..46,48..255)'`"/f"`perl -e 'print pack("c*",1..9,11..46,48..255)'`"; cat d"`perl -e 'print pack("c*",1..9,11..46,48..255)'`"/g"`perl -e 'print pack("c*",1..9,11..46,48..255)'`"; # Should be changed to --return '{=s:/f:/g:=}'
|
||||
local
|
||||
remote OK
|
||||
|
|
Loading…
Reference in a new issue