tests/test-options.t
author Martin von Zweigbergk <martinvonz@google.com>
Tue, 12 Mar 2019 09:44:05 -0700
changeset 4452 444e664616c7
parent 4185 9bce7e6c18b3
child 4354 cb39b767ad3c
permissions -rw-r--r--
tests: reduce dependence on previous tests for setup The tests in test-evolve-phase-divergence.t built on each other for no good reason, which makes the tests hard to modify and hard to read. This patch cleans up some of them. We should clean up the rest too, but the rest won't matter for my next patch, so I haven't bothered.

  $ cat >> $HGRCPATH <<EOF
  > [ui]
  > logtemplate={rev}:{node|short}[{bookmarks}] ({obsolete}/{phase}) {desc|firstline}\n
  > [extensions]
  > EOF
  $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH

  $ mkcommit() {
  >    echo "$1" > "$1"
  >    hg add "$1"
  >    hg ci -m "add $1"
  > }

  $ hg init repo
  $ cd repo
  $ mkcommit a
  $ mkcommit b

test disabling commands

  $ cat >> .hg/hgrc <<EOF
  > [experimental]
  > evolution=createmarkers
  >   allowunstable
  >   exchange
  > EOF
  $ hg prune
  hg: unknown command 'prune'
  (use 'hg help' for a list of commands)
  [255]