summaryrefslogtreecommitdiff
path: root/testsuite/cwdrepl.at
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/cwdrepl.at')
-rw-r--r--testsuite/cwdrepl.at59
1 files changed, 59 insertions, 0 deletions
diff --git a/testsuite/cwdrepl.at b/testsuite/cwdrepl.at
new file mode 100644
index 000000000..9cd15a903
--- /dev/null
+++ b/testsuite/cwdrepl.at
@@ -0,0 +1,59 @@
1# This file is part of GNU Mailutils. -*- Autotest -*-
2# Copyright (C) 2017 Free Software Foundation, Inc.
3#
4# GNU Mailutils is free software; you can redistribute it and/or
5# modify it under the terms of the GNU General Public License as
6# published by the Free Software Foundation; either version 3, or (at
7# your option) any later version.
8#
9# GNU Mailutils is distributed in the hope that it will be useful, but
10# WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12# General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License
15# along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
16
17AT_SETUP([cwdrepl tool])
18AT_KEYWORDS([cwdrepl])
19
20AT_CHECK([
21pwd -P >/dev/null 2>&1 || AT_SKIP_TEST
22cwd=`pwd -P`
23cwdrepl <<EOT
24$cwd
25CWD is "$cwd"
26$cwd/foo "$cwd" end
27EOT
28],
29[0],
30[.
31CWD is "."
32./foo "." end
33])
34
35AT_CHECK([
36pwd -P >/dev/null 2>&1 || AT_SKIP_TEST
37pwd -L >/dev/null 2>&1 || AT_SKIP_TEST
38mkdir physical logical
39ln -s physical logical || AT_SKIP_TEST
40cd logical
41phy=`pwd -P`
42log=`pwd -L`
43cwdrepl <<EOT
44$phy $log
45LOG is "$log", PHY is "$phy"
46$log/foo "$log" end
47$phy/foo "$phy" end
48EOT
49],
50[0],
51[. .
52LOG is ".", PHY is "."
53./foo "." end
54./foo "." end
55])
56
57AT_CLEANUP
58
59

Return to:

Send suggestions and report system problems to the System administrator.