mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 07:17:55 +03:00
tests: unify test-subrepo-paths
This commit is contained in:
parent
7cbf3336a2
commit
ddb79b6591
@ -1,27 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
hg init outer
|
||||
cd outer
|
||||
|
||||
echo 'sub = http://example.net/libfoo' > .hgsub
|
||||
hg add .hgsub
|
||||
|
||||
echo '% hg debugsub with no remapping'
|
||||
hg debugsub
|
||||
|
||||
cat > .hg/hgrc <<EOF
|
||||
[subpaths]
|
||||
http://example.net = ssh://localhost
|
||||
EOF
|
||||
|
||||
echo '% hg debugsub with remapping'
|
||||
hg debugsub
|
||||
|
||||
echo '% test bad subpaths pattern'
|
||||
cat > .hg/hgrc <<EOF
|
||||
[subpaths]
|
||||
.* = \1
|
||||
EOF
|
||||
hg debugsub 2>&1 | "$TESTDIR/filtertmp.py"
|
||||
|
||||
exit 0
|
@ -1,10 +0,0 @@
|
||||
% hg debugsub with no remapping
|
||||
path sub
|
||||
source http://example.net/libfoo
|
||||
revision
|
||||
% hg debugsub with remapping
|
||||
path sub
|
||||
source ssh://localhost/libfoo
|
||||
revision
|
||||
% test bad subpaths pattern
|
||||
abort: bad subrepository pattern in $HGTMP/test-subrepo-paths/outer/.hg/hgrc:2: invalid group reference
|
35
tests/test-subrepo-paths.t
Normal file
35
tests/test-subrepo-paths.t
Normal file
@ -0,0 +1,35 @@
|
||||
$ hg init outer
|
||||
$ cd outer
|
||||
|
||||
$ echo 'sub = http://example.net/libfoo' > .hgsub
|
||||
$ hg add .hgsub
|
||||
|
||||
hg debugsub with no remapping
|
||||
|
||||
$ hg debugsub
|
||||
path sub
|
||||
source http://example.net/libfoo
|
||||
revision
|
||||
|
||||
$ cat > .hg/hgrc <<EOF
|
||||
> [subpaths]
|
||||
> http://example.net = ssh://localhost
|
||||
> EOF
|
||||
|
||||
hg debugsub with remapping
|
||||
|
||||
$ hg debugsub
|
||||
path sub
|
||||
source ssh://localhost/libfoo
|
||||
revision
|
||||
|
||||
test bad subpaths pattern
|
||||
|
||||
$ cat > .hg/hgrc <<EOF
|
||||
> [subpaths]
|
||||
> .* = \1
|
||||
> EOF
|
||||
$ hg debugsub
|
||||
abort: bad subrepository pattern in .*/test-subrepo-paths.t/outer/.hg/hgrc:2: invalid group reference
|
||||
|
||||
$ exit 0
|
Loading…
Reference in New Issue
Block a user