diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-16 19:25:24 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-16 19:25:24 +0000 |
commit | 72ca0d52ddd1bcc243afe80b78fd9d0e0a6cc936 (patch) | |
tree | 366eb95223e97792f05d22eec56b675c5a0b33ec /debian/tests/hello-world | |
parent | Adding upstream version 1.22.1. (diff) | |
download | golang-1.22-72ca0d52ddd1bcc243afe80b78fd9d0e0a6cc936.tar.xz golang-1.22-72ca0d52ddd1bcc243afe80b78fd9d0e0a6cc936.zip |
Adding debian version 1.22.1-1.debian/1.22.1-1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/tests/hello-world')
-rw-r--r-- | debian/tests/hello-world | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/debian/tests/hello-world b/debian/tests/hello-world new file mode 100644 index 0000000..1b8be0d --- /dev/null +++ b/debian/tests/hello-world @@ -0,0 +1,20 @@ +#!/bin/sh + +set -ex + +GO="/usr/lib/go-$(dpkg-parsechangelog -SSource | sed 's/golang-//')/bin/go" + +WORKDIR=$(mktemp -d) +trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM +cd $WORKDIR +cat <<EOF > hello.go +package main +import "fmt" +func main() { + fmt.Println("hello world") +} +EOF + +$GO run hello.go +$GO build hello.go +./hello |