sapling/eden/scm/tests/test-username-newline.t
Jun Wu 00ecfbb16c tests: opt-in new test runner for passing tests
Summary:
A lot of tests are passing with the new test runner.

This is done by `./edit-feature-header.py debugruntest` and paste
the `Passed:` section from `hg debugruntest -v test-*.t` output.

Note: some tests fail with this but pass with debugruntest. They
will be investigated as follow-up.

Differential Revision: D34931992

fbshipit-source-id: 99abc3d9800bb1dd3487dbfa15d715c0bd3ba878
2022-08-16 14:59:23 -07:00

30 lines
542 B
Perl

#chg-compatible
#debugruntest-compatible
$ hg init repo
$ cd repo
$ touch a
$ unset HGUSER
$ echo "[ui]" >> .hg/hgrc
$ echo "username= foo" >> .hg/hgrc
$ echo " bar1" >> .hg/hgrc
$ hg ci -Am m
adding a
abort: username 'foo\nbar1' contains a newline
[255]
$ rm .hg/hgrc
$ HGUSER=`(echo foo; echo bar2)` hg ci -Am m
adding a
abort: username 'foo\nbar2' contains a newline
[255]
$ hg ci -Am m -u "`(echo foo; echo bar3)`"
adding a
abort: username 'foo\nbar3' contains a newline!
[255]