view tests/test-nested-repo.t @ 26952:4e566f513fd8

tests: tolerate differences between Linux and Windows error strings These are related to differences in how missing files and network connection failures are displayed. I opted to combine the strings in one line instead of using '#if windows' blocks around entire commands in order to avoid future changes being accidentally missed in the Windows sections. Globbing away the entire output seemed wrong, as it could mask other failures. The raw messages involved are: Linux Windows "* not known" <-> "getaddrinfo failed" "Connection refused" <-> "No connection could be made because the target machine actively refused it" "No such file or directory" <-> "The system cannot find the file specified" Issue 4941 indicates that NetBSD has yet another string for "* not known". Also, the histedit test shows that the missing file is printed first on Windows, last on Linux. That is controlled in windows.py:posixfile if we care to change it.
author Matt Harbison <matt_harbison@yahoo.com>
date Mon, 09 Nov 2015 13:12:35 -0500
parents 4cdec37f0018
children 4441705b7111
line wrap: on
line source

  $ hg init a
  $ cd a
  $ hg init b
  $ echo x > b/x

Should print nothing:

  $ hg add b
  $ hg st

  $ echo y > b/y
  $ hg st

Should fail:

  $ hg st b/x
  abort: path 'b/x' is inside nested repo 'b' (glob)
  [255]
  $ hg add b/x
  abort: path 'b/x' is inside nested repo 'b' (glob)
  [255]

Should fail:

  $ hg add b b/x
  abort: path 'b/x' is inside nested repo 'b' (glob)
  [255]
  $ hg st

Should arguably print nothing:

  $ hg st b

  $ echo a > a
  $ hg ci -Ama a

Should fail:

  $ hg mv a b
  abort: path 'b/a' is inside nested repo 'b' (glob)
  [255]
  $ hg st

  $ cd ..