view tests/test-username-newline.t @ 28335:515018f64c41

tests: Solaris cp doesn't support the -T option The treemanifest tests use the -T option to cp in order to ensure that the two directories named on the commandline are treated as peers, rather than the usual behavior when the final argument is a directory. GNU cp has this option, but other implementations may not. Thankfully, there's no pressing reason to use it. We can simply copy the contents of the first directory into the target directory, since we know that the target directory already exists.
author Danek Duvall <danek.duvall@oracle.com>
date Wed, 02 Mar 2016 14:50:37 -0800
parents 3b165c127690
children 5ac845ca059a
line wrap: on
line source

  $ 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
  abort: username 'foo\nbar2' contains a newline
  
  [255]
  $ hg ci -Am m -u "`(echo foo; echo bar3)`"
  transaction abort!
  rollback completed
  abort: username 'foo\nbar3' contains a newline!
  [255]