Mercurial > hg-stable
changeset 29343:e095b9e753f7
tests: move chg pager test to test-pager.t
The test is valid for both hg and chg. Since we are adding another chg-related
pager test, let's put them together.
author | Jun Wu <quark@fb.com> |
---|---|
date | Mon, 13 Jun 2016 13:16:17 +0100 |
parents | c27dc3c31222 |
children | bb3d5c20eaf6 |
files | tests/test-chg.t tests/test-pager.t |
diffstat | 2 files changed, 12 insertions(+), 20 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-chg.t Fri Jun 10 00:13:23 2016 -0400 +++ b/tests/test-chg.t Mon Jun 13 13:16:17 2016 +0100 @@ -15,26 +15,6 @@ hg: parse error at * (glob) [255] -alias having an environment variable and set to use pager - - $ rm $HGRCPATH - $ cat >> $HGRCPATH <<'EOF' - > [ui] - > formatted = yes - > [extensions] - > pager = - > [pager] - > pager = sed -e 's/^/P/' - > attend = printa - > [alias] - > printa = log -T "$A\n" -r 0 - > EOF - - $ A=1 chg printa - P1 - $ A=2 chg printa - P2 - $ cp $HGRCPATH.orig $HGRCPATH $ cd ..
--- a/tests/test-pager.t Fri Jun 10 00:13:23 2016 -0400 +++ b/tests/test-pager.t Mon Jun 13 13:16:17 2016 +0100 @@ -189,3 +189,15 @@ a $ hg --config pager.attend-echoa=yes echoa paged! 'a\n' + +Pager works with hg aliases including environment variables. + + $ cat >> $HGRCPATH <<'EOF' + > [alias] + > printa = log -T "$A\n" -r 0 + > EOF + + $ A=1 hg --config pager.attend-printa=yes printa + paged! '1\n' + $ A=2 hg --config pager.attend-printa=yes printa + paged! '2\n'