tests/test-username-newline.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Sat, 28 Nov 2020 17:23:50 +0100
changeset 45973 456c617c8285
parent 45921 95c4cca641f6
child 46117 17a695357270
permissions -rw-r--r--
test: fix some expect output in a traceback The lines moved around because of 89a2afe31e82. Differential Revision: https://phab.mercurial-scm.org/D9447

  $ hg init
  $ 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
  transaction abort!
  rollback completed
  abort: username 'foo\nbar3' contains a newline
  [255]