diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 16:14:31 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 16:14:31 +0000 |
commit | 2d5707c7479eacb3b1ad98e01b53f56a88f8fb78 (patch) | |
tree | d9c334e83692851c02e3e1b8e65570c97bc82481 /testsuite/trimslash.test | |
parent | Initial commit. (diff) | |
download | rsync-2d5707c7479eacb3b1ad98e01b53f56a88f8fb78.tar.xz rsync-2d5707c7479eacb3b1ad98e01b53f56a88f8fb78.zip |
Adding upstream version 3.2.7.upstream/3.2.7
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testsuite/trimslash.test')
-rw-r--r-- | testsuite/trimslash.test | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/testsuite/trimslash.test b/testsuite/trimslash.test new file mode 100644 index 0000000..2efaa07 --- /dev/null +++ b/testsuite/trimslash.test @@ -0,0 +1,26 @@ +#!/bin/sh + +# Copyright (C) 2002 by Martin Pool <mbp@samba.org> + +# This program is distributable under the terms of the GNU GPL (see +# COPYING). + +# Test tiny function to trim trailing slashes. + +. "$suitedir/rsync.fns" + +"$TOOLDIR/trimslash" "/usr/local/bin" "/usr/local/bin/" "/usr/local/bin///" \ + "//a//" "////" \ + "/Users/Weird Macintosh Name/// Ooh, translucent plastic/" \ + > "$scratchdir/slash.out" +diff $diffopt "$scratchdir/slash.out" - <<EOF +/usr/local/bin +/usr/local/bin +/usr/local/bin +//a +/ +/Users/Weird Macintosh Name/// Ooh, translucent plastic +EOF + +# The script would have aborted on error, so getting here means we've won. +exit 0 |