[PATCH 1 of 2 V2] tests: move chg pager test to test-pager.t
Jun Wu
quark at fb.com
Mon Jun 13 12:33:45 UTC 2016
# HG changeset patch
# User Jun Wu <quark at fb.com>
# Date 1465820177 -3600
# Mon Jun 13 13:16:17 2016 +0100
# Node ID e095b9e753f7c8e729d5624891d1ea67ed18344d
# Parent c27dc3c31222c7f74331221a3d25566146feecac
# Available At https://bitbucket.org/quark-zju/hg-draft
# hg pull https://bitbucket.org/quark-zju/hg-draft -r 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.
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 @@
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 @@
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'
More information about the Mercurial-devel
mailing list