Skip to content

Commit

Permalink
Add tests using testdata input files
Browse files Browse the repository at this point in the history
- add collection of testdata files
  - `input`
    - `encoded-all`
    - `encoded-mixed`
    - `invalid-all`
    - `invalid-mixed`
  - `output`
    - `embedded`
    - `standalone`
- add "exported" tests which focus strictly on exported functionality
  of the `internal/safelinks` package
- add minor dependency on the `google/go-cmp` package for some tests
- add brief README for testdata content to explain purpose, important
  of preserving the exact formatting (mostly specific EOL) within the
  input and output testdata files

refs GH-251
  • Loading branch information
atc0005 committed Apr 7, 2024
1 parent 2767ae5 commit ad2dfe3
Show file tree
Hide file tree
Showing 61 changed files with 6,496 additions and 1 deletion.
5 changes: 4 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ module github.com/atc0005/safelinks

go 1.20

require fyne.io/fyne/v2 v2.4.4
require (
fyne.io/fyne/v2 v2.4.4
github.com/google/go-cmp v0.6.0
)

require (
fyne.io/systray v1.10.1-0.20231115130155-104f5ef7839e // indirect
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
Expand Down
Loading

0 comments on commit ad2dfe3

Please sign in to comment.