lockbox

password manager
Log | Files | Refs | README | LICENSE

commit 56ecc71488a89554caaf4e24cf2d8b16ce9b1c8c
parent 119fd8dc2d4d0df427caff3a7a08bd75a270756b
Author: Sean Enck <sean@ttypty.com>
Date:   Fri,  3 Mar 2023 20:02:48 -0500

primitive clipboard checks

Diffstat:
Mscripts/testing/check.go | 14++++++++++++++
Mscripts/testing/expected.log | 1+
2 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/scripts/testing/check.go b/scripts/testing/check.go @@ -11,6 +11,8 @@ import ( "regexp" "strings" "time" + + "github.com/enckse/lockbox/internal/util" ) var yes = []string{"y"} @@ -189,5 +191,17 @@ func execute() error { os.Setenv("LOCKBOX_KEY", reKey) fmt.Println() ls() + clipCopyFile := filepath.Join(path, "clipboard") + clipPasteFile := clipCopyFile + ".paste" + os.Setenv("LOCKBOX_CLIP_COPY", fmt.Sprintf("touch %s", clipCopyFile)) + os.Setenv("LOCKBOX_CLIP_PASTE", fmt.Sprintf("touch %s", clipPasteFile)) + os.Setenv("LOCKBOX_CLIP_MAX", "5") + runCommand([]string{"clip", "keys/k/one2"}, nil) + runCommand([]string{"clear"}, []string{"test"}) + for _, f := range []string{clipCopyFile, clipPasteFile} { + if !util.PathExists(f) { + fmt.Printf("missing clipboard file: %s\n", f) + } + } return nil } diff --git a/scripts/testing/expected.log b/scripts/testing/expected.log @@ -104,3 +104,4 @@ keys/k/one2 proceed with rekey? (y/N) keys/k/one2 +clipboard will clear in 5 seconds