tests/test-cat.t
author Patrick Mezard <pmezard@gmail.com>
Thu, 19 Aug 2010 23:13:20 +0200
changeset 11993 9bce7ed50c9a
parent 11874 a3c1234b3761
child 12070 fddacca3202e
permissions -rw-r--r--
Merge with stable
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
11874
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
     1
  $ mkdir t
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
     2
  $ cd t
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
     3
  $ hg init
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
     4
  $ echo 0 > a
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
     5
  $ echo 0 > b
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
     6
  $ hg ci -A -m m -d "1000000 0"
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
     7
  adding a
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
     8
  adding b
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
     9
  $ hg rm a
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
    10
  $ hg cat a
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
    11
  0
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
    12
  $ hg cat --decode a # more tests in test-encode
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
    13
  0
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
    14
  $ echo 1 > b
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
    15
  $ hg ci -m m -d "1000000 0"
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
    16
  $ echo 2 > b
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
    17
  $ hg cat -r 0 a
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
    18
  0
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
    19
  $ hg cat -r 0 b
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
    20
  0
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
    21
  $ hg cat -r 1 a
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
    22
  a: No such file in rev 03f6b0774996
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
    23
  $ hg cat -r 1 b
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
    24
  1