Skip to content

Commit

Permalink
Test hello world sample.
Browse files Browse the repository at this point in the history
  • Loading branch information
udhos committed Apr 13, 2017
1 parent 69cfdd2 commit 77069c6
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 7 deletions.
7 changes: 7 additions & 0 deletions hello.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package main

import "fmt"

func main() {
fmt.Printf("hello, world\n")
}
31 changes: 25 additions & 6 deletions update-golang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -148,19 +148,38 @@ path() {

test() {
local ret=1
local t="$abs_gotool version"
if [ "$abs_goroot" != $default_goroot ]; then
msg testing: GOROOT=$abs_goroot $abs_gotool version
GOROOT=$abs_goroot $abs_gotool version
msg testing: GOROOT=$abs_goroot $t
GOROOT=$abs_goroot $t
ret=$?
else
msg testing: $abs_gotool version
$abs_gotool version
msg testing: $t
$t
ret=$?
fi
if [ $ret -eq 0 ]; then
msg SUCCESS
msg $t: SUCCESS
else
msg FAIL
msg $t FAIL
fi

local abs_hello=`solve hello.go`
ret=1
t="$abs_gotool run $abs_hello"
if [ "$abs_goroot" != $default_goroot ]; then
msg testing: GOROOT=$abs_goroot $t
GOROOT=$abs_goroot $t
ret=$?
else
msg testing: $t
$t
ret=$?
fi
if [ $ret -eq 0 ]; then
msg $t: SUCCESS
else
msg $t FAIL
fi
}

Expand Down
2 changes: 1 addition & 1 deletion update-golang.sh.sha256
Original file line number Diff line number Diff line change
@@ -1 +1 @@
a98ce14b9cd0e5c76b5251fb635fcca9d0ebd7f00ecf3f37ce38fcbe7ec2040e update-golang.sh
e7124c0a64df458ac418dfc107f1841e9b3ce3e5828fee919778d776d1148405 update-golang.sh

0 comments on commit 77069c6

Please sign in to comment.