add a test for new --file option. ref #170

This commit is contained in:
Paul Irish 2024-08-05 17:06:40 -07:00
parent 866c39dbf4
commit a7d09090c2

View file

@ -183,6 +183,19 @@ setup() {
assert_output "https://gist.github.com/2d84a6db1b41b4020685"
}
@test "gh: --file option" {
run ../git-open -f readme.txt
assert_output "https://github.com/paulirish/git-open/tree/master/readme.txt"
# and now a new file in a subdirectory.
mkdir -p subdir
touch subdir/howdy.txt
git add subdir
git commit -am add-in-howdy
run ../git-open -f subdir/howdy.txt
assert_output "https://github.com/paulirish/git-open/tree/master/subdir/howdy.txt"
}
@test "basic: # and % in branch names are URL encoded" {
# https://github.com/paulirish/git-open/pull/24
git checkout -B "issue-#42"