Skip to content

Commit 2d1791c

Browse files
committed
clean up unit tests
1 parent dc54c75 commit 2d1791c

File tree

3 files changed

+25
-18
lines changed

3 files changed

+25
-18
lines changed

bin/test

Lines changed: 0 additions & 10 deletions
This file was deleted.

hack/test.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
if [ -z "$GITHUB_ACTION" ]; then
6+
go clean -testcache
7+
fi
8+
9+
set -u
10+
11+
go fmt ./...
12+
go test ./...
13+
14+
go build ./ui/
15+
go build -o /dev/null github.com/cppforlife/go-cli-ui/examples/...
16+
17+
echo SUCCESS

ui/table/table_test.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ r2c1|r2c2|
233233
table.Print(buf)
234234
Expect("\n" + buf.String()).To(Equal(`
235235
r1c1|r1c2|
236-
~...|r2c2|
236+
^...|r2c2|
237237
r3c1|r3c2|
238238
`))
239239
})
@@ -357,9 +357,9 @@ r2c1|r2c2|
357357
table.Print(buf)
358358
Expect("\n" + buf.String()).To(Equal(`
359359
dup..|dup|
360-
~....|dup|
360+
^....|dup|
361361
dup2.|dup|
362-
~....|dup|
362+
^....|dup|
363363
other|dup|
364364
`))
365365
})
@@ -417,9 +417,9 @@ other|dup|
417417
table.Print(buf)
418418
Expect("\n" + buf.String()).To(Equal(`
419419
dup.|dup|
420-
~...|dup|
420+
^...|dup|
421421
dup2|dup|
422-
~...|dup|
422+
^...|dup|
423423
`))
424424
})
425425

@@ -443,9 +443,9 @@ dup2|dup|
443443
table.Print(buf)
444444
Expect("\n" + buf.String()).To(Equal(`
445445
dup..|1|
446-
~....|2|
446+
^....|2|
447447
dup2.|3|
448-
~....|4|
448+
^....|4|
449449
other|5|
450450
`))
451451
})
@@ -463,7 +463,7 @@ other|5|
463463
table.Print(buf)
464464
Expect("\n" + buf.String()).To(Equal(`
465465
-|-|
466-
~|-|
466+
^|-|
467467
`))
468468
})
469469

0 commit comments

Comments
 (0)