28959a3f31
Previous to this patch, having a config like the following would not work properly: - link: ~/a: ~/b This was because the '~' was expanded on the left hand side (the link target), but not the right hand side (the link source). It was necessary to use a workaround like this: - link: ~/a: $HOME/b This was because variable expansion was being done, but user expansion was not being done. This commit adds support for using '~' in the link source.
17 lines
242 B
Bash
17 lines
242 B
Bash
test_description='link expands user in target'
|
|
. '../test-lib.bash'
|
|
|
|
test_expect_success 'setup' '
|
|
echo "apple" > ~/f
|
|
'
|
|
|
|
test_expect_success 'run' '
|
|
run_dotbot <<EOF
|
|
- link:
|
|
~/g: ~/f
|
|
EOF
|
|
'
|
|
|
|
test_expect_success 'test' '
|
|
grep "apple" ~/g
|
|
'
|