All pastes #560050 Raw Edit

Stuff

public text v1 · immutable
·published 2007-06-12 00:05 UTC
rendered paste body
* expecting failure: git tag -l
* FAIL 1: listing all tags in an empty tree should fail (no tags)
	git tag -l

* expecting success: test -n `git-tag -l`
*   ok 2: listing all tags in an empty tree should output nothing

* expecting failure: git-tag mytag
fatal: Needed a single revision
*   ok 3: creating a tag in an empty tree should fail

* expecting failure: git-tag mytag HEAD
fatal: Needed a single revision
*   ok 4: creating a tag for HEAD in an empty tree should fail

* expecting failure: git-tag mytag unknown-rev
fatal: Needed a single revision
*   ok 5: creating a tag for an unknown revision should fail

* expecting success: echo foo >foo &&
	git add foo &&
	test_tick && git commit -m Foo &&
	git tag mytag
Created initial commit 86e17e4: Foo
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 foo
*   ok 6: creating a tag using default HEAD should succeed

* expecting success: git-tag -l
mytag
*   ok 7: listing all tags if one exists should succeed

* expecting success: test `git-tag -l` = mytag
*   ok 8: listing all tags if one exists should output that tag

* expecting success: git-tag -l "^mytag$"
*   ok 9: listing tags using a matching pattern should succeed

* expecting success: test `git-tag -l "^mytag$"` = mytag
./test-lib.sh: line 141: test: =: unary operator expected
* FAIL 10: listing a tag using a matching pattern should output that tag
	test `git-tag -l "^mytag$"` = mytag

* expecting failure: git-tag -l xxx
* FAIL 11: listing tags using a non-matching pattern should fail
	git-tag -l xxx

* expecting success: test -n `git-tag -l xxx`
*   ok 12: listing tags using a non-matching pattern should output nothing

* expecting failure: git-tag -l "a["
* FAIL 13: listing tags using a non-valid pattern should fail
	git-tag -l "a["

* expecting failure: git tag mytag
tag 'mytag' already exists
*   ok 14: trying to create a tag with the name of one existing should fail

* expecting failure: git tag .othertag
we do not like '.othertag' as a tag name.
*   ok 15: trying to create a tag with a non-valid name should fail

* expecting success: git tag myhead HEAD &&
	test `git-tag -l "^myhead$"` = myhead
./test-lib.sh: line 142: test: =: unary operator expected
* FAIL 16: creating a tag using HEAD directly should succeed
	git tag myhead HEAD &&
		test `git-tag -l "^myhead$"` = myhead

* expecting failure: git tag othertag aaaaaaaaaaa
* FAIL 17: trying to create a tag for a non-existing revision name should fail
	git tag othertag aaaaaaaaaaa

* expecting failure: git-tag -d unknown-tag
fatal: 'refs/tags/unknown-tag' - not a valid ref
Seriously, what tag are you talking about?
*   ok 18: trying to delete an unknown tag should fail

* expecting success: git-tag -d &&
	test `git-tag -l "^mytag$"` = mytag &&
	test `git-tag -l "^myhead$"` = myhead
./test-lib.sh: line 142: test: =: unary operator expected
* FAIL 19: trying to delete tags without params should do nothing
	git-tag -d &&
		test `git-tag -l "^mytag$"` = mytag &&
		test `git-tag -l "^myhead$"` = myhead

* expecting success: git-tag -d mytag myhead &&
	test `git-tag -l "^mytag$" | wc -l` -eq 0 &&
	test `git-tag -l "^myhead$" | wc -l` -eq 0
Deleted tag mytag.
Deleted tag myhead.
*   ok 20: deleting two existing tags should succeed

* expecting success: test `git-tag -l "^mytag$" | wc -l` -eq 0 &&
	git-tag mytag &&
	test `git-tag -l "^mytag$"` = mytag
./test-lib.sh: line 143: test: =: unary operator expected
* FAIL 21: create a tag with the name of another deleted one should succeed
	test `git-tag -l "^mytag$" | wc -l` -eq 0 &&
		git-tag mytag &&
		test `git-tag -l "^mytag$"` = mytag

* expecting failure: git-tag -d mytag anothertag
Deleted tag mytag.
fatal: 'refs/tags/anothertag' - not a valid ref
Seriously, what tag are you talking about?
*   ok 22: trying to delete two tags -existing and not- should fail for the 2nd

* expecting failure: git-tag -d mytag
fatal: 'refs/tags/mytag' - not a valid ref
Seriously, what tag are you talking about?
*   ok 23: trying to delete an already deleted tag should fail

* expecting success: 
	git-tag non-annotated-tag &&
	! git cat-file tag non-annotated-tag &&
	test "$(git rev-parse non-annotated-tag^{commit})" = \
		"$(git rev-parse HEAD)"

fatal: git-cat-file non-annotated-tag: bad file
*   ok 24: non-annotated tag was created successfully

* expecting failure: git-tag -v unknown-tag
fatal: 'refs/tags/unknown-tag' - not a valid ref
Seriously, what tag are you talking about?
*   ok 25: trying to verify an unknown tag should fail

* expecting failure: git-tag -v non-annotated-tag
86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b: cannot verify a non-tag object of type commit.
*   ok 26: trying to verify a non-annotated and non-signed tag should fail

* expecting success: 
	git-tag -m "A message" annotated-tag &&
	get_tag_msg annotated-tag >actual &&
	git diff expect actual

diff --git a/expect b/actual
*   ok 27: creating an annotated tag with -m message should succeed

* expecting success: 
	git-tag -F msgfile file-annotated-tag &&
	get_tag_msg file-annotated-tag >actual &&
	git diff expect actual

diff --git a/expect b/actual
*   ok 28: creating an annotated tag with -F messagefile should succeed

* expecting failure: 
	test -f nonexistingfile ||
	git-tag -l "^notag$" ||
	git-tag -F nonexistingfile notag ||
	git-tag -l "^notag$"

* FAIL 29: trying to create a tag using a non-existing message file should fail
	
		test -f nonexistingfile ||
		git-tag -l "^notag$" ||
		git-tag -F nonexistingfile notag ||
		git-tag -l "^notag$"
	

* expecting success: 
	git-tag -m "" empty-annotated-tag &&
	get_tag_msg empty-annotated-tag >actual &&
	git diff expect actual

diff --git a/expect b/actual
*   ok 30: creating a tag with an empty -m message should succeed

* expecting success: 
	git-tag -F emptyfile emptyfile-annotated-tag &&
	get_tag_msg emptyfile-annotated-tag >actual &&
	git diff expect actual

diff --git a/expect b/actual
*   ok 31: creating a tag with an empty -F messagefile should succeed

* expecting success: 
	git-tag -F blanksfile blanks-annotated-tag &&
	get_tag_msg blanks-annotated-tag >actual &&
	git diff expect actual

diff --git a/expect b/actual
*   ok 32: extra blanks in the message for an annotated tag should be removed

* expecting success: 
	git-tag -m "     " blank-annotated-tag &&
	get_tag_msg blank-annotated-tag >actual &&
	git diff expect actual

diff --git a/expect b/actual
*   ok 33: creating a tag with blank -m message with spaces should succeed

* expecting success: 
	git-tag -F blankfile blankfile-annotated-tag &&
	get_tag_msg blankfile-annotated-tag >actual &&
	git diff expect actual

diff --git a/expect b/actual
*   ok 34: creating a tag with blank -F messagefile with spaces should succeed

* expecting success: 
	git-tag -F blanknonlfile blanknonlfile-annotated-tag &&
	get_tag_msg blanknonlfile-annotated-tag >actual &&
	git diff expect actual

diff --git a/expect b/actual
*   ok 35: creating a tag with -F file of spaces and no newline should succeed

* expecting success: 
	git-tag -F commentsfile comments-annotated-tag &&
	get_tag_msg comments-annotated-tag >actual &&
	git diff expect actual

diff --git a/expect b/actual
*   ok 36: creating a tag using a -F messagefile with #comments should succeed

* expecting success: 
	git-tag -m "#comment" comment-annotated-tag &&
	get_tag_msg comment-annotated-tag >actual &&
	git diff expect actual

diff --git a/expect b/actual
*   ok 37: creating a tag with a #comment in the -m message should succeed

* expecting success: 
	git-tag -F commentfile commentfile-annotated-tag &&
	get_tag_msg commentfile-annotated-tag >actual &&
	git diff expect actual

diff --git a/expect b/actual
*   ok 38: creating a tag with #comments in the -F messagefile should succeed

* expecting success: 
	git-tag -F commentnonlfile commentnonlfile-annotated-tag &&
	get_tag_msg commentnonlfile-annotated-tag >actual &&
	git diff expect actual

diff --git a/expect b/actual
*   ok 39: creating a tag with a file of #comment and no newline should succeed

* expecting failure: ! git-tag -l "^annotated-tag$" ||
	git-tag -v annotated-tag
object 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b
type commit
tag annotated-tag
tagger C O Mitter <committer@example.com> Thu Apr 7 15:13:13 2005 -0700

A message
gpg: no valid OpenPGP data found.
gpg: the signature could not be verified.
Please remember that the signature file (.sig or .asc)
should be the first file given on the command line.
*   ok 40: trying to verify an annotated non-signed tag should fail

* expecting failure: ! git-tag -l "^file-annotated-tag$" ||
	git-tag -v file-annotated-tag
object 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b
type commit
tag file-annotated-tag
tagger C O Mitter <committer@example.com> Thu Apr 7 15:13:13 2005 -0700

Another message
in a file.
gpg: no valid OpenPGP data found.
gpg: the signature could not be verified.
Please remember that the signature file (.sig or .asc)
should be the first file given on the command line.
*   ok 41: trying to verify a file-annotated non-signed tag should fail

* expecting success: 
	git-tag -s -m "A signed tag message" signed-tag &&
	get_tag_msg signed-tag >actual &&
	git-diff expect actual

diff --git a/expect b/actual
*   ok 42: creating a signed tag with -m message should succeed

* expecting success: git-tag -v signed-tag
object 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b
type commit
tag signed-tag
tagger C O Mitter <committer@example.com> Thu Apr 7 15:13:13 2005 -0700

A signed tag message
gpg: Signature made Tue Jun 12 00:01:50 2007 UTC using DSA key ID CDDE430D
gpg: Good signature from "C O Mitter <committer@example.com>"
*   ok 43: verifying a signed tag should succeed

* expecting failure: 
	test -f nonexistingfile ||
	git-tag -l "^nosigtag$" ||
	git-tag -s -F nonexistingfile nosigtag ||
	git-tag -l "^nosigtag$"

* FAIL 44: trying to create a signed tag using a non-existing file should fail
	
		test -f nonexistingfile ||
		git-tag -l "^nosigtag$" ||
		git-tag -s -F nonexistingfile nosigtag ||
		git-tag -l "^nosigtag$"
	

* expecting success: 
	git-tag -s -m "" empty-signed-tag &&
	get_tag_msg empty-signed-tag >actual &&
	git diff expect actual &&
	git-tag -v empty-signed-tag

diff --git a/expect b/actual
object 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b
type commit
tag empty-signed-tag
tagger C O Mitter <committer@example.com> Thu Apr 7 15:13:13 2005 -0700

gpg: Signature made Tue Jun 12 00:01:50 2007 UTC using DSA key ID CDDE430D
gpg: Good signature from "C O Mitter <committer@example.com>"
*   ok 45: creating a signed tag with an empty -m message should succeed

* expecting success: 
	git-tag -s -F sigemptyfile emptyfile-signed-tag &&
	get_tag_msg emptyfile-signed-tag >actual &&
	git diff expect actual &&
	git-tag -v emptyfile-signed-tag

diff --git a/expect b/actual
object 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b
type commit
tag emptyfile-signed-tag
tagger C O Mitter <committer@example.com> Thu Apr 7 15:13:13 2005 -0700

gpg: Signature made Tue Jun 12 00:01:50 2007 UTC using DSA key ID CDDE430D
gpg: Good signature from "C O Mitter <committer@example.com>"
*   ok 46: creating a signed tag with an empty -F messagefile should succeed

* expecting success: 
	git-tag -s -F sigblanksfile blanks-signed-tag &&
	get_tag_msg blanks-signed-tag >actual &&
	git diff expect actual &&
	git-tag -v blanks-signed-tag

diff --git a/expect b/actual
object 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b
type commit
tag blanks-signed-tag
tagger C O Mitter <committer@example.com> Thu Apr 7 15:13:13 2005 -0700

Leading blank lines

Repeated blank lines

Trailing spaces

Trailing blank lines
gpg: Signature made Tue Jun 12 00:01:50 2007 UTC using DSA key ID CDDE430D
gpg: Good signature from "C O Mitter <committer@example.com>"
*   ok 47: extra blanks in the message for a signed tag should be removed

* expecting success: 
	git-tag -s -m "     " blank-signed-tag &&
	get_tag_msg blank-signed-tag >actual &&
	git diff expect actual &&
	git-tag -v blank-signed-tag

diff --git a/expect b/actual
object 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b
type commit
tag blank-signed-tag
tagger C O Mitter <committer@example.com> Thu Apr 7 15:13:13 2005 -0700

gpg: Signature made Tue Jun 12 00:01:50 2007 UTC using DSA key ID CDDE430D
gpg: Good signature from "C O Mitter <committer@example.com>"
*   ok 48: creating a signed tag with a blank -m message should succeed

* expecting success: 
	git-tag -s -F sigblankfile blankfile-signed-tag &&
	get_tag_msg blankfile-signed-tag >actual &&
	git diff expect actual &&
	git-tag -v blankfile-signed-tag

diff --git a/expect b/actual
object 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b
type commit
tag blankfile-signed-tag
tagger C O Mitter <committer@example.com> Thu Apr 7 15:13:13 2005 -0700

gpg: Signature made Tue Jun 12 00:01:50 2007 UTC using DSA key ID CDDE430D
gpg: Good signature from "C O Mitter <committer@example.com>"
*   ok 49: creating a signed tag with blank -F file with spaces should succeed

* expecting success: 
	git-tag -s -F sigblanknonlfile blanknonlfile-signed-tag &&
	get_tag_msg blanknonlfile-signed-tag >actual &&
	git diff expect actual &&
	git-tag -v signed-tag

diff --git a/expect b/actual
object 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b
type commit
tag signed-tag
tagger C O Mitter <committer@example.com> Thu Apr 7 15:13:13 2005 -0700

A signed tag message
gpg: Signature made Tue Jun 12 00:01:50 2007 UTC using DSA key ID CDDE430D
gpg: Good signature from "C O Mitter <committer@example.com>"
*   ok 50: creating a signed tag with spaces and no newline should succeed

* expecting success: 
	git-tag -s -F sigcommentsfile comments-signed-tag &&
	get_tag_msg comments-signed-tag >actual &&
	git diff expect actual &&
	git-tag -v comments-signed-tag

diff --git a/expect b/actual
object 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b
type commit
tag comments-signed-tag
tagger C O Mitter <committer@example.com> Thu Apr 7 15:13:13 2005 -0700

The message.
One line.

Another line.

Last line.
gpg: Signature made Tue Jun 12 00:01:50 2007 UTC using DSA key ID CDDE430D
gpg: Good signature from "C O Mitter <committer@example.com>"
*   ok 51: creating a signed tag with a -F file with #comments should succeed

* expecting success: 
	git-tag -s -m "#comment" comment-signed-tag &&
	get_tag_msg comment-signed-tag >actual &&
	git diff expect actual &&
	git-tag -v comment-signed-tag

diff --git a/expect b/actual
object 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b
type commit
tag comment-signed-tag
tagger C O Mitter <committer@example.com> Thu Apr 7 15:13:13 2005 -0700

gpg: Signature made Tue Jun 12 00:01:50 2007 UTC using DSA key ID CDDE430D
gpg: Good signature from "C O Mitter <committer@example.com>"
*   ok 52: creating a signed tag with #commented -m message should succeed

* expecting success: 
	git-tag -s -F sigcommentfile commentfile-signed-tag &&
	get_tag_msg commentfile-signed-tag >actual &&
	git diff expect actual &&
	git-tag -v commentfile-signed-tag

diff --git a/expect b/actual
object 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b
type commit
tag commentfile-signed-tag
tagger C O Mitter <committer@example.com> Thu Apr 7 15:13:13 2005 -0700

gpg: Signature made Tue Jun 12 00:01:50 2007 UTC using DSA key ID CDDE430D
gpg: Good signature from "C O Mitter <committer@example.com>"
*   ok 53: creating a signed tag with #commented -F messagefile should succeed

* expecting success: 
	git-tag -s -F sigcommentnonlfile commentnonlfile-signed-tag &&
	get_tag_msg commentnonlfile-signed-tag >actual &&
	git diff expect actual &&
	git-tag -v commentnonlfile-signed-tag

diff --git a/expect b/actual
object 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b
type commit
tag commentnonlfile-signed-tag
tagger C O Mitter <committer@example.com> Thu Apr 7 15:13:13 2005 -0700

gpg: Signature made Tue Jun 12 00:01:51 2007 UTC using DSA key ID CDDE430D
gpg: Good signature from "C O Mitter <committer@example.com>"
*   ok 54: creating a signed tag with a #comment and no newline should succeed

* expecting failure: git-tag -v signed-tag
object 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b
type commit
tag signed-tag
tagger C O Mitter <committer@example.com> Thu Apr 7 15:13:13 2005 -0700

A signed tag message
gpg: keyblock resource `/home/gene099/my/gsoc-builtins/t/trash/gpghome/pubring.gpg': file open error
gpg: Signature made Tue Jun 12 00:01:50 2007 UTC using DSA key ID CDDE430D
gpg: Can't check signature: public key not found
*   ok 55: verify signed tag fails when public key is not present

* failed 10 among 55 test(s)