tests/test-chg.t
author Yuya Nishihara <yuya@tcha.org>
Sun, 20 Mar 2016 14:59:03 -0700
changeset 29274 148a9a5379f0
parent 29088 983353035cec
child 29275 e53f961ac75f
permissions -rw-r--r--
test-chg: run only with chg It doesn't make sense to run test-chg.t without chg, so ignore it with vanilla hg, and specify chg executable explicitly. test-chg.t can host chg-specific tests.

#require chg

init repo

  $ chg init foo
  $ cd foo

ill-formed config

  $ chg status
  $ echo '=brokenconfig' >> $HGRCPATH
  $ chg status
  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