diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2017-07-16 21:40:29 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2017-07-16 21:40:29 +0100 |
commit | 4d5ef701bf95a1c60a5cc1b9f5c4d771ac49375a (patch) | |
tree | b84199fcd94bd4c2700c995c3ec093d113a77284 /tests | |
parent | 18413810f983efbd083a2fd0cbc2c2cbbadc558b (diff) | |
parent | a80f7d09b0f92b5e1bc39f828f7972f3ff7c41be (diff) |
Merge branch 'stable' into HEAD
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib | 1 | ||||
-rw-r--r-- | tests/pkg-srcs/example_1.1.orig.tar.gz | bin | 0 -> 404 bytes | |||
-rwxr-xr-x | tests/tests/import-dsc | 22 | ||||
-rwxr-xr-x | tests/tests/unrepresentable | 33 | ||||
-rw-r--r-- | tests/worktrees/example_1.0.tar | bin | 122880 -> 71680 bytes | |||
l--------- | tests/worktrees/example_1.1.tar | 1 |
6 files changed, 48 insertions, 9 deletions
@@ -12,6 +12,7 @@ t-report-failure () { rc=$1 cat <<END >&2 TEST FAILED +cwd: $PWD funcs: ${FUNCNAME[*]} lines: ${BASH_LINENO[*]} files: ${BASH_SOURCE[*]} diff --git a/tests/pkg-srcs/example_1.1.orig.tar.gz b/tests/pkg-srcs/example_1.1.orig.tar.gz Binary files differnew file mode 100644 index 0000000..d975490 --- /dev/null +++ b/tests/pkg-srcs/example_1.1.orig.tar.gz diff --git a/tests/tests/import-dsc b/tests/tests/import-dsc index 073ba7b..bdd849c 100755 --- a/tests/tests/import-dsc +++ b/tests/tests/import-dsc @@ -72,6 +72,28 @@ git init check-import $troot/pkg-srcs 1.0-1 +cd .. +v=1.0-1+absurd +rm -f ${p}_* +dsc=$troot/pkg-srcs/${p}_${v}.dsc +cd $p.2 + +cp $dsc .. +t-expect-fail 'it does not exist' \ +check-import .. $v + +mkdir ../enoents +cp $dsc ../enoents +t-expect-fail 'No such file or directory' \ +check-import ../enoents $v + +cd .. +rm -f ${p}_${v}.dsc +dget -du file://$dsc +cd $p.2 + +check-import .. $v + t-expect-fail "Your git tree does not have that object" \ check-import ../mirror/pool/main 1.2 --no-chase-dsc-distro diff --git a/tests/tests/unrepresentable b/tests/tests/unrepresentable index 0d02c6a..e4b0da8 100755 --- a/tests/tests/unrepresentable +++ b/tests/tests/unrepresentable @@ -4,14 +4,19 @@ set -e t-tstunt-parsechangelog -t-prep-newpackage example 1.0 +t-prep-newpackage example 1.1 ln -s $troot/pkg-srcs/${p}_${v%-*}.orig.tar.* . cd $p -start () { git checkout quilt-tip~0; } +start () { git checkout quilt-tip-1.1~0; } attempt () { t-dgit -wgf --quilt=smash quilt-fixup; } +good () { + attempt + t-dgit --quilt=nofix -wgf build-source + t-dgit -wgf --dry-run push --new +} badly-1 () { wrongfn=$1 @@ -25,28 +30,38 @@ badly-2 () { attempt } -badly-1 symlink 'not a plain file' - ln -s TARGET symlink - git add symlink +badly-1 orig-symlink 'modified symlink' + ln -sf NEWTARGET orig-symlink + git add orig-symlink +badly-2 + +badly-1 orig-symlink 'deletion of symlink' + git rm -f orig-symlink badly-2 start git rm src.c git commit -m deleted -attempt +good + +start + git rm orig-exec + git rm -f orig-unwriteable + git commit -m 'deleted funny' +good -badly-1 src.c 'mode changed' +badly-1 src.c 'mode or type changed' chmod +x src.c git add src.c badly-2 -badly-1 new 'non-default mode' +badly-1 new 'creation with non-default mode' echo hi >new chmod 755 new git add new badly-2 start -attempt +good t-ok diff --git a/tests/worktrees/example_1.0.tar b/tests/worktrees/example_1.0.tar Binary files differindex 50baa33..6f66a91 100644 --- a/tests/worktrees/example_1.0.tar +++ b/tests/worktrees/example_1.0.tar diff --git a/tests/worktrees/example_1.1.tar b/tests/worktrees/example_1.1.tar new file mode 120000 index 0000000..6acd590 --- /dev/null +++ b/tests/worktrees/example_1.1.tar @@ -0,0 +1 @@ +example_1.0.tar
\ No newline at end of file |