diff options
Diffstat (limited to 'testsuite/cwdrepl.at')
-rw-r--r-- | testsuite/cwdrepl.at | 59 |
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 | |||
17 | AT_SETUP([cwdrepl tool]) | ||
18 | AT_KEYWORDS([cwdrepl]) | ||
19 | |||
20 | AT_CHECK([ | ||
21 | pwd -P >/dev/null 2>&1 || AT_SKIP_TEST | ||
22 | cwd=`pwd -P` | ||
23 | cwdrepl <<EOT | ||
24 | $cwd | ||
25 | CWD is "$cwd" | ||
26 | $cwd/foo "$cwd" end | ||
27 | EOT | ||
28 | ], | ||
29 | [0], | ||
30 | [. | ||
31 | CWD is "." | ||
32 | ./foo "." end | ||
33 | ]) | ||
34 | |||
35 | AT_CHECK([ | ||
36 | pwd -P >/dev/null 2>&1 || AT_SKIP_TEST | ||
37 | pwd -L >/dev/null 2>&1 || AT_SKIP_TEST | ||
38 | mkdir physical logical | ||
39 | ln -s physical logical || AT_SKIP_TEST | ||
40 | cd logical | ||
41 | phy=`pwd -P` | ||
42 | log=`pwd -L` | ||
43 | cwdrepl <<EOT | ||
44 | $phy $log | ||
45 | LOG is "$log", PHY is "$phy" | ||
46 | $log/foo "$log" end | ||
47 | $phy/foo "$phy" end | ||
48 | EOT | ||
49 | ], | ||
50 | [0], | ||
51 | [. . | ||
52 | LOG is ".", PHY is "." | ||
53 | ./foo "." end | ||
54 | ./foo "." end | ||
55 | ]) | ||
56 | |||
57 | AT_CLEANUP | ||
58 | |||
59 | |||