[PATCH] test-alias: adapt for Windows

Mads Kiilerich mads at kiilerich.com
Sat Jun 16 15:10:10 CDT 2012


Adrian Buehlmann wrote, On 06/15/2012 11:56 AM:
> # HG changeset patch
> # User Adrian Buehlmann <adrian at cadifra.com>
> # Date 1339753863 -7200
> # Node ID d786babf6932997b9838d0554844cc76f45a52c0
> # Parent  be64115b495522d575fe92193000f9f7ded33125
> test-alias: adapt for Windows

Thanks, but I pushed a different solution to crew. Instead of skipping 
parts of the test it uses aliases that also works on windows.

/Mads

>
> diff --git a/tests/test-alias.t b/tests/test-alias.t
> --- a/tests/test-alias.t
> +++ b/tests/test-alias.t
> @@ -1,5 +1,3 @@
> -  $ "$TESTDIR/hghave" system-sh || exit 80
> -
>     $ HGFOO=BAR; export HGFOO
>     $ cat >> $HGRCPATH <<EOF
>     > [extensions]
> @@ -194,6 +192,7 @@
>   
>   simple shell aliases
>   
> +#if system-sh
>     $ hg blank
>     
>     $ hg blank foo
> @@ -214,8 +213,12 @@
>     foo baz
>     $ hg echo2 foo
>     
> +#endif
> +
>     $ echo bar > bar
>     $ hg commit -qA -m bar
> +
> +#if system-sh
>     $ hg count .
>     1
>     $ hg count 'branch(default)'
> @@ -228,6 +231,7 @@
>     |
>     o  0:e63c23eaa88a: 'foo'
>     
> +#endif
>   
>   
>   shadowing
> @@ -246,6 +250,7 @@
>     7e7f92de180e tip
>     $ hg idaliasl
>     7e7f92de180e tip
> +#if system-sh
>     $ hg idaliass
>     test
>     $ hg parentsshell
> @@ -256,12 +261,14 @@
>     one
>     $ hg parentsshell2
>     two
> +#endif
>   
>   
>   shell aliases with global options
>   
>     $ hg init sub
>     $ cd sub
> +#if system-sh
>     $ hg count 'branch(default)'
>     0
>     $ hg -v count 'branch(default)'
> @@ -272,6 +279,7 @@
>     2
>     $ hg echo --cwd ..
>     
> +#endif
>   
>   
>   repo specific shell aliases
> @@ -288,6 +296,8 @@
>   
>   shell alias defined in current repo
>   
> +#if system-sh
> +
>     $ hg subalias
>     sub
>     $ hg --cwd .. subalias > /dev/null
> @@ -320,6 +330,8 @@
>     $ hg escaped4 test
>     $0 $@
>   
> +#endif
> +
>   
>   invalid arguments
>   
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel




More information about the Mercurial-devel mailing list