[PATCH] test-init: enable for Windows
Adrian Buehlmann
adrian at cadifra.com
Mon Jun 11 11:26:25 UTC 2012
On 2012-06-10 22:31, Adrian Buehlmann wrote:
> # HG changeset patch
> # User Adrian Buehlmann <adrian at cadifra.com>
> # Date 1339360183 -7200
> # Node ID 66632eaeb05f7560cd57ff77d0b05a82833e17c8
> # Parent ad229181ddbed0ebd93bf48bb36a22e965d8a4a0
> test-init: enable for Windows
>
> Simply removing the testcase that tries to create a repo with the name " ".
>
> diff --git a/tests/test-init.t b/tests/test-init.t
> --- a/tests/test-init.t
> +++ b/tests/test-init.t
> @@ -1,5 +1,3 @@
> - $ "$TESTDIR/hghave" no-windows || exit 80
> -
> This test tries to exercise the ssh functionality with a dummy script
>
> $ checknewrepo()
> @@ -124,7 +122,7 @@
>
> check names for repositories (clashes with URL schemes, special chars)
>
> - $ for i in bundle file hg http https old-http ssh static-http " " "with space"; do
> + $ for i in bundle file hg http https old-http ssh static-http "with space"; do
> > printf "hg init \"$i\"... "
> > hg init "$i"
> > test -d "$i" -a -d "$i/.hg" && echo "ok" || echo "failed"
> @@ -137,7 +135,6 @@
> hg init "old-http"... ok
> hg init "ssh"... ok
> hg init "static-http"... ok
> - hg init " "... ok
> hg init "with space"... ok
On 2012-06-11 12:36, Mads Kiilerich wrote (in reply to a different patch):
> AFAICS this will remove a relevant existing test case on all platforms.
> I don't think that is acceptable unless there is a very good reason to
> do so. It must be possible to move the essentials of that test case to a
> separate section that can be #if guarded.
>
> (The same apply to removing the ' ' test in test-init.t)
How relevant is it to create a repository with the name " "?
Is that really a valid name for a repository?
But sure, if you prefer to have a testcase that creates a repository with
the name " ", we can easily insert some #if to do that on Platforms !=
Windows.
On Windows, you can't create a directory with the name " ". It's not a
valid name for a directory.
More information about the Mercurial-devel
mailing list