sapling/tests/test-catnotate.t
Tony Tung 52d9676213 echo -n not platform-agnostic
Summary: printf appears to be more platform agnostic than echo -n, which is not supported on bsd/mac.

Test Plan: run PYTHONPATH=~/work/mercurial/facebook-hg-rpms/remotenames/:~/work/mercurial/facebook-hg-rpms/mutable-history/hgext  python ~/work/mercurial/facebook-hg-rpms/hg-crew/tests/run-tests.py -j32 test-catnotate.t

Reviewers: #mercurial, simonfar

Reviewed By: simonfar

Subscribers: simonfar, mitrandir, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3419500

Signature: t1:3419500:1465590785:a34da9af73c64d9edef66a7b4a6ed3abd885e5c7
2016-06-10 13:37:24 -07:00

49 lines
678 B
Raku

Test catnotate
$ hg init repo1
$ cd repo1
$ cat > .hg/hgrc <<EOF
> [extensions]
> sparse=$(dirname $TESTDIR)/catnotate.py
> strip=
> EOF
$ cat > a <<EOF
> Hell
> on
> world
> EOF
$ cat > b <<EOF
> Hello
> world
> EOF
$ printf "\0\n" >> b
$ hg add a b
$ hg commit -m "Hello :)"
$ hg catnotate a b
a:1: Hell
a:2: on
a:3: world
a:4:
b: binary file
$ hg catnotate -a a b
a:1: Hell
a:2: on
a:3: world
a:4:
b:1: Hello
b:2: world
b:3: \x00 (esc)
b:4:
$ hg update 0
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg catnotate --rev . a
a:1: Hell
a:2: on
a:3: world
a:4: