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.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
29274
148a9a5379f0 test-chg: run only with chg
Yuya Nishihara <yuya@tcha.org>
parents: 29088
diff changeset
     1
#require chg
148a9a5379f0 test-chg: run only with chg
Yuya Nishihara <yuya@tcha.org>
parents: 29088
diff changeset
     2
28516
3bf2892f685f chgserver: handle ParseError during validate
Jun Wu <quark@fb.com>
parents:
diff changeset
     3
init repo
3bf2892f685f chgserver: handle ParseError during validate
Jun Wu <quark@fb.com>
parents:
diff changeset
     4
29274
148a9a5379f0 test-chg: run only with chg
Yuya Nishihara <yuya@tcha.org>
parents: 29088
diff changeset
     5
  $ chg init foo
28516
3bf2892f685f chgserver: handle ParseError during validate
Jun Wu <quark@fb.com>
parents:
diff changeset
     6
  $ cd foo
3bf2892f685f chgserver: handle ParseError during validate
Jun Wu <quark@fb.com>
parents:
diff changeset
     7
3bf2892f685f chgserver: handle ParseError during validate
Jun Wu <quark@fb.com>
parents:
diff changeset
     8
ill-formed config
3bf2892f685f chgserver: handle ParseError during validate
Jun Wu <quark@fb.com>
parents:
diff changeset
     9
29274
148a9a5379f0 test-chg: run only with chg
Yuya Nishihara <yuya@tcha.org>
parents: 29088
diff changeset
    10
  $ chg status
28516
3bf2892f685f chgserver: handle ParseError during validate
Jun Wu <quark@fb.com>
parents:
diff changeset
    11
  $ echo '=brokenconfig' >> $HGRCPATH
29274
148a9a5379f0 test-chg: run only with chg
Yuya Nishihara <yuya@tcha.org>
parents: 29088
diff changeset
    12
  $ chg status
28516
3bf2892f685f chgserver: handle ParseError during validate
Jun Wu <quark@fb.com>
parents:
diff changeset
    13
  hg: parse error at * (glob)
3bf2892f685f chgserver: handle ParseError during validate
Jun Wu <quark@fb.com>
parents:
diff changeset
    14
  [255]
29088
983353035cec chgserver: remove _clearenvaliases
Jun Wu <quark@fb.com>
parents: 28516
diff changeset
    15
983353035cec chgserver: remove _clearenvaliases
Jun Wu <quark@fb.com>
parents: 28516
diff changeset
    16
alias having an environment variable and set to use pager
983353035cec chgserver: remove _clearenvaliases
Jun Wu <quark@fb.com>
parents: 28516
diff changeset
    17
983353035cec chgserver: remove _clearenvaliases
Jun Wu <quark@fb.com>
parents: 28516
diff changeset
    18
  $ rm $HGRCPATH
983353035cec chgserver: remove _clearenvaliases
Jun Wu <quark@fb.com>
parents: 28516
diff changeset
    19
  $ cat >> $HGRCPATH <<'EOF'
983353035cec chgserver: remove _clearenvaliases
Jun Wu <quark@fb.com>
parents: 28516
diff changeset
    20
  > [ui]
983353035cec chgserver: remove _clearenvaliases
Jun Wu <quark@fb.com>
parents: 28516
diff changeset
    21
  > formatted = yes
983353035cec chgserver: remove _clearenvaliases
Jun Wu <quark@fb.com>
parents: 28516
diff changeset
    22
  > [extensions]
983353035cec chgserver: remove _clearenvaliases
Jun Wu <quark@fb.com>
parents: 28516
diff changeset
    23
  > pager =
983353035cec chgserver: remove _clearenvaliases
Jun Wu <quark@fb.com>
parents: 28516
diff changeset
    24
  > [pager]
983353035cec chgserver: remove _clearenvaliases
Jun Wu <quark@fb.com>
parents: 28516
diff changeset
    25
  > pager = sed -e 's/^/P/'
983353035cec chgserver: remove _clearenvaliases
Jun Wu <quark@fb.com>
parents: 28516
diff changeset
    26
  > attend = printa
983353035cec chgserver: remove _clearenvaliases
Jun Wu <quark@fb.com>
parents: 28516
diff changeset
    27
  > [alias]
983353035cec chgserver: remove _clearenvaliases
Jun Wu <quark@fb.com>
parents: 28516
diff changeset
    28
  > printa = log -T "$A\n" -r 0
983353035cec chgserver: remove _clearenvaliases
Jun Wu <quark@fb.com>
parents: 28516
diff changeset
    29
  > EOF
983353035cec chgserver: remove _clearenvaliases
Jun Wu <quark@fb.com>
parents: 28516
diff changeset
    30
29274
148a9a5379f0 test-chg: run only with chg
Yuya Nishihara <yuya@tcha.org>
parents: 29088
diff changeset
    31
  $ A=1 chg printa
29088
983353035cec chgserver: remove _clearenvaliases
Jun Wu <quark@fb.com>
parents: 28516
diff changeset
    32
  P1
29274
148a9a5379f0 test-chg: run only with chg
Yuya Nishihara <yuya@tcha.org>
parents: 29088
diff changeset
    33
  $ A=2 chg printa
29088
983353035cec chgserver: remove _clearenvaliases
Jun Wu <quark@fb.com>
parents: 28516
diff changeset
    34
  P2