# HG changeset patch # User Jun Wu # Date 2016-06-13 12:16:17 # Node ID e095b9e753f7c8e729d5624891d1ea67ed18344d # Parent c27dc3c31222c7f74331221a3d25566146feecac 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. diff --git a/tests/test-chg.t b/tests/test-chg.t --- a/tests/test-chg.t +++ b/tests/test-chg.t @@ -15,26 +15,6 @@ ill-formed config 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 .. diff --git a/tests/test-pager.t b/tests/test-pager.t --- a/tests/test-pager.t +++ b/tests/test-pager.t @@ -189,3 +189,15 @@ Pager works with shell aliases. 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'