sapling/tests/test-fb-hgext-checkmessagehook.t
Kostia Balytskyi b27a46c987 fb-hgext: fix copied fb-hgext tests
Summary:
This is a big bulk of generally almost-obvious fixes to the moved tests. Mostly
these fixes have to do with correct importing of the actual extensions.

Depends on D6675329

Test Plan:
- ./run-tests.py fails less after this commit
- see further commits for more test fixes

Reviewers: #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D6675344
2018-01-09 03:06:09 -08:00

29 lines
694 B
Perl

$ cat >> $HGRCPATH <<EOF
> [extensions]
> checkmessagehook=
> EOF
Build up a repo
$ hg init repo
$ cd repo
$ touch a
$ hg commit -A -l $TESTDIR/ctrlchar-msg.txt
adding a
non-printable characters in commit message
Line 5: 'This has a sneaky ctrl-A: \x01'
Line 6: 'And this has esc: \x1b'
transaction abort!
rollback completed
abort: pretxncommit.checkmessage hook failed
[255]
$ hg commit -A -l $TESTDIR/perfectlyok-msg.txt
adding a
$ hg log -r .
changeset: 0:d9cf9881be7b
tag: tip
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: This commit message is perfectly OK, and has no sneaky control characters.