Skip to content

Commit e75e871

Browse files
committed
tests: reorganize files
1 parent 78c0ed6 commit e75e871

13 files changed

+22
-10
lines changed

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
#
55
# Written by Changkun Ou <changkun.de>
66

7-
FROM golang:1.16
7+
FROM golang:1.17
88
RUN apt-get update && apt-get install -y \
9-
xvfb libx11-dev \
9+
xvfb libx11-dev libegl1-mesa-dev libgles2-mesa-dev \
1010
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
1111
WORKDIR /app
1212
COPY . .
13-
CMD [ "sh", "-c", "./test-docker.sh" ]
13+
CMD [ "sh", "-c", "./tests/test-docker.sh" ]

clipboard_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func init() {
2424

2525
func TestClipboard(t *testing.T) {
2626
t.Run("image", func(t *testing.T) {
27-
data, err := os.ReadFile("testdata/clipboard.png")
27+
data, err := os.ReadFile("tests/testdata/clipboard.png")
2828
if err != nil {
2929
t.Fatalf("failed to read gold file: %v", err)
3030
}
@@ -92,7 +92,7 @@ func TestClipboard(t *testing.T) {
9292
}
9393

9494
func TestClipboardMultipleWrites(t *testing.T) {
95-
data, err := os.ReadFile("testdata/clipboard.png")
95+
data, err := os.ReadFile("tests/testdata/clipboard.png")
9696
if err != nil {
9797
t.Fatalf("failed to read gold file: %v", err)
9898
}

cmd/gclip-gui/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ provided in the [GoMobile wiki](https://github.com/golang/go/wiki/Mobile) page.
2222

2323
## Screenshots
2424

25-
| macOS | iOS | Windows | Android |
26-
|:------:|:---:|:------:|:-------:|
27-
|![](./darwin.png)|![](./ios.png)|![](./windows.png)|![](./android.png)|
25+
| macOS | iOS | Windows | Android | Linux |
26+
|:-----:|:---:|:-------:|:-------:|:-----:|
27+
|![](../../tests/testdata/darwin.png)|![](../../tests/testdata/ios.png)|![](../../tests/testdata/windows.png)|![](../../tests/testdata/android.png)|![](../../tests/testdata/linux.png)|
2828

2929
## License
3030

example_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
// Copyright 2021 The golang.design Initiative Authors.
2+
// All rights reserved. Use of this source code is governed
3+
// by a MIT license that can be found in the LICENSE file.
4+
//
5+
// Written by Changkun Ou <changkun.de>
6+
17
package clipboard_test
28

39
import (

export_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
// Copyright 2021 The golang.design Initiative Authors.
2+
// All rights reserved. Use of this source code is governed
3+
// by a MIT license that can be found in the LICENSE file.
4+
//
5+
// Written by Changkun Ou <changkun.de>
6+
17
package clipboard
28

39
// for debugging errors

Makefile renamed to tests/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
all: test
88

99
test:
10-
go test -v -count=1 -covermode=atomic ./...
10+
go test -v -count=1 -covermode=atomic ..
1111

1212
test-docker:
13-
docker build -t golang-design/x/clipboard .
13+
docker build -t golang-design/x/clipboard ..
1414
docker run --rm --name cb golang-design/x/clipboard
1515
docker rmi golang-design/x/clipboard
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

tests/testdata/linux.png

28.3 KB
Loading
File renamed without changes.

0 commit comments

Comments
 (0)