update testscript

This commit is contained in:
2025-09-17 20:33:48 +02:00
parent 2eb4eacbc2
commit 4561bf06d7
13 changed files with 20 additions and 21 deletions

View File

@@ -124,7 +124,7 @@ var Templates = map[string]string{
}
const (
VERSION string = "0.0.7"
VERSION string = "0.0.8"
DefaultCount int = 160 // number of words to generate if -c is omitted
DefaultColumns int = 10 // number of columns to print
MaxWidth int = 72 // max width of output, adjusts columns

4
go.mod
View File

@@ -10,7 +10,7 @@ require (
github.com/knadh/koanf/providers/file v1.2.0
github.com/knadh/koanf/providers/posflag v1.0.1
github.com/knadh/koanf/v2 v2.3.0
github.com/rogpeppe/go-internal v1.13.1
github.com/rogpeppe/go-internal v1.14.1
github.com/s0rg/fantasyname v1.3.6
github.com/spf13/pflag v1.0.6
github.com/tlinden/yadu v0.1.3
@@ -28,6 +28,6 @@ require (
github.com/pelletier/go-toml v1.9.5 // indirect
golang.org/x/sys v0.32.0 // indirect
golang.org/x/text v0.21.0 // indirect
golang.org/x/tools v0.22.0 // indirect
golang.org/x/tools v0.26.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

8
go.sum
View File

@@ -30,8 +30,8 @@ github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3v
github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII=
github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o=
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
github.com/s0rg/fantasyname v1.3.6 h1:KOezDl0ijuuIDre06tqMz8idCEIdaM7KMkSnU/8bCxc=
github.com/s0rg/fantasyname v1.3.6/go.mod h1:9cZ037rckuT6N7DijPi2xpuuYFgJpLlcbpXMptYuEdY=
github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o=
@@ -45,8 +45,8 @@ golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20=
golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo=
golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
golang.org/x/tools v0.22.0 h1:gqSGLZqv+AI9lIQzniJ0nZDRG5GBPsSi+DRNHWNz6yA=
golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c=
golang.org/x/tools v0.26.0 h1:v/60pFQmzmT9ExmjDv2gGIfi3OqfKoEP6I5+umXlbnQ=
golang.org/x/tools v0.26.0/go.mod h1:TPVVj70c7JJ3WCazhD8OdXcZg/og+b9+tH/KxylGwH0=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=

View File

@@ -18,7 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
package main
import (
"os"
"testing"
"github.com/rogpeppe/go-internal/testscript"
@@ -27,12 +26,12 @@ import (
// see https://bitfieldconsulting.com/golang/test-scripts
func TestMain(m *testing.M) {
os.Exit(testscript.RunMain(m, map[string]func() int{
"testgfn": TMain,
}))
testscript.Main(m, map[string]func(){
"gfn": main,
})
}
func TestFfn(t *testing.T) {
func TestGfn(t *testing.T) {
testscript.Run(t, testscript.Params{
Dir: "t",
})

View File

@@ -1,2 +1,2 @@
exec testgfn -d Vs
exec gfn -d Vs
stdout 'gfn/generate.go:'

View File

@@ -1,2 +1,2 @@
exec testgfn -h
exec gfn -h
stdout 'This is gfn'

View File

@@ -1,2 +1,2 @@
exec testgfn -l
exec gfn -l
stdout 'JapaneseNamesDiverse'

View File

@@ -1 +1 @@
! exec testgfn
! exec gfn

View File

@@ -1,2 +1,2 @@
exec testgfn akx
exec gfn akx
stdout 'akx'

View File

@@ -1,2 +1,2 @@
exec testgfn akx
exec gfn akx
! stdout 'akx akx'

View File

@@ -1,2 +1,2 @@
exec testgfn Idiots
exec gfn Idiots
stdout 'face'

View File

@@ -1,2 +1,2 @@
exec testgfn sVdmi(usus|hehe)
exec gfn sVdmi(usus|hehe)
stdout 'usus'

View File

@@ -1,2 +1,2 @@
exec testgfn -v
exec gfn -v
stdout 'This is gfn version'