Skip to content

Commit

Permalink
Mangle :save-options test paths to write to HOME
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas committed Jul 31, 2017
1 parent d2e864a commit 26c0e4a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
9 changes: 3 additions & 6 deletions test/tigrc/save-option-test
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,18 @@

. libtest.sh

saved_tigrc="$HOME/saved-tigrc"
check_tigrc="$HOME/check-tigrc"

steps "
:save-options $saved_tigrc
:save-options saved-tigrc
"

test_tig status
cp stderr stderr.1

steps "
:save-options $check_tigrc
:save-options check-tigrc
"

TIGRC_USER="$saved_tigrc" test_tig status
TIGRC_USER="$HOME/saved-tigrc" test_tig status
cp stderr stderr.2

cat stderr.* > stderr
Expand Down
1 change: 1 addition & 0 deletions test/tools/libtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ tig_script() {
printf '%s\n:quit\n' "$*" \
| sed -e 's/^[ ]*//' \
| sed "s|:save-display[ ]\{1,\}\([^ ]\{1,\}\)|:save-display $HOME/\1|" \
| sed "s|:save-options[ ]\{1,\}\([^ ]\{1,\}\)|:save-options $HOME/\1|" \
| sed "s|:save-view[ ]\{1,\}\([^ ]\{1,\}\)|:save-view $HOME/\1|" \
> "$TIG_SCRIPT"
}
Expand Down

0 comments on commit 26c0e4a

Please sign in to comment.