File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ case "${1:-"install"}" in
7777 ;;
7878 " install" )
7979 deps_file=" ${2:- " Godeps" } "
80- [[ -f " $deps_file " ]] || (echo " >> $deps_file file does not exist." && exit 1)
80+ [[ -r " $deps_file " ]] || (echo " >> $deps_file file does not exist." && exit 1)
8181 (which go > /dev/null) ||
8282 ( echo " >> Go is currently not installed or in your PATH" && exit 1)
8383 set_dependencies $deps_file
Original file line number Diff line number Diff line change 11. assert.sh
22
33GPM=../bin/gpm
4+
5+ # Standard gpm usage
6+ rm -rf $GOPATH /src/github.com/pote/gpm-testing-package
7+ echo " github.com/pote/gpm-testing-package v6.1" > Godeps
8+ assert_raises $GPM
9+ assert " go run go_code.go" " v6.1"
10+
11+ rm Godeps
12+
413# Setting up v5.0 of package
514rm -rf $GOPATH /src/github.com/pote/gpm-testing-package
615echo " github.com/pote/gpm-testing-package v6.1" > Godeps.prod
Original file line number Diff line number Diff line change 33GPM=../bin/gpm
44
55# Setting up v5.0 of package
6- cat > Godeps << EOF
6+ deps= $( cat << EOF
77# A comment here...
88github.tiyicn.workers.dev/nu7hatch/gotrail v0.0.2
99github.tiyicn.workers.dev/pote/gpm-testing-package v6.1 # a comment there!
1010
1111# github.com/pote/gpm-testing-package v6.2
1212EOF
13+ )
1314
14- $GPM
15+ $GPM install <( echo " $deps " )
1516assert " go run go_code.go" " v6.1"
1617
17- rm Godeps
1818assert_end examples
Original file line number Diff line number Diff line change 22
33GPM=../bin/gpm
44# Setting up v5.0 of package
5- echo " github.com/pote/gpm-testing-package v6.1" > Godeps
6- assert_raises " $GPM "
5+ assert_raises " $GPM install <(echo 'github.com/pote/gpm-testing-package v6.1')"
76assert " go run go_code.go" " v6.1"
87
98# Setting up v5.1 of package
10- echo " github.com/pote/gpm-testing-package v6.2" > Godeps
11- assert_raises " $GPM "
9+ assert_raises " $GPM install <(echo 'github.com/pote/gpm-testing-package v6.2')"
1210assert " go run go_code.go" " v6.2"
13- rm Godeps
1411
1512assert_end examples
Original file line number Diff line number Diff line change 11. assert.sh
22GPM=../bin/gpm
33
4- echo "
4+ deps= $( cat << EOF
55# Bazaar Repos
66launchpad.net/gocheck r2013.03.03
77
@@ -10,10 +10,10 @@ code.google.com/p/go.example/hello/... ae081cd1d6cc
1010
1111# Git Repos
1212github.tiyicn.workers.dev/nu7hatch/gotrail v0.0.2
13- " > Godeps
13+ EOF
14+ )
1415
15- $GPM
16+ $GPM install <( echo " $deps " )
1617assert " echo " $? " " " 0"
17- rm Godeps
1818
1919assert_end examples
You can’t perform that action at this time.
0 commit comments