From 925683b5810a3707831a30ac59a7a446af21c5f1 Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Sun, 17 Oct 2021 14:02:09 +0200 Subject: #62: Fix tests (empty root is now allowed) --- pkg/config/url_test.go | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/pkg/config/url_test.go b/pkg/config/url_test.go index d345690..492ccd8 100644 --- a/pkg/config/url_test.go +++ b/pkg/config/url_test.go @@ -43,8 +43,22 @@ func TestUrl_Unmarshal(t *testing.T) { {name: "Err: Inv scheme", inp: `url: "smtp://user%40example:pass@example.net:4711/INBOX"`, wantErr: true}, {name: "Err: No Host", inp: `url: "imap://user%40example:pass/INBOX"`, wantErr: true}, {name: "Err: Scheme Only", inp: `url: "imap://"`, wantErr: true}, - {name: "Err: No Root", inp: `url: "imap://user:pass@example.net:143"`, wantErr: true}, - {name: "Err: No Root: Slash", inp: `url: "imap://user:pass@example.net:143/"`, wantErr: true}, + {name: "No Root", inp: `url: "imap://user:pass@example.net:143"`, url: Url{ + Scheme: "imap", + User: "user", + Password: "pass", + Host: "example.net", + Port: "143", + Root: "", + }}, + {name: "No Root: Slash", inp: `url: "imap://user:pass@example.net:143/"`, url: Url{ + Scheme: "imap", + User: "user", + Password: "pass", + Host: "example.net", + Port: "143", + Root: "/", + }}, {name: "Full", inp: `url: scheme: imap host: example.net -- cgit v1.2.3-70-g09d2 gtreecommitdiff
path: root/man (unfollow)
Commit message (Collapse)AuthorFilesLines
2012-09-21Add option to init to reencrypt all passwords.Jason A. Donenfeld1-2/+6
Reported-by: Simon KP <si@eskp.net>
2012-09-20Fixed bash completion for files with spacesJeffrey Ratcliffe1-4/+5
2012-09-20Quit if pwgen returns nothing.Jason A. Donenfeld1-0/+1
Reported-by: Brian Mattern <rephorm@rephorm.com>
2012-09-20Prompt before overwriting password in generate, unless --force is provided.Jason A. Donenfeld2-25/+28
2012-09-19Make qdbus ugliness more segmented.Jason A. Donenfeld1-3/+8
2012-09-19Delete debian directory.Jason A. Donenfeld6-51/+0
Now that Colin Watson has taken over Debian packaging, I can get rid of our own local poorly written debian/ directory.
2012-09-19No more push/pull in zsh script, either.Jason A. Donenfeld1-3/+1
2012-09-19Since we're using batch mode, we can read directly.Jason A. Donenfeld1-1/+1
2012-09-19Clean up git handling.Jason A. Donenfeld2-42/+28
Get rid of push/pull shortcuts, as they weren't widely used. Add contents to repo on git init. Centralize git add logic, and make it less error prone.
2012-09-19Fix git regression.Jason A. Donenfeld1-1/+1
2012-09-18Add additional information from KeepassX xmlJuhamatti Niemelä1-3/+15
Import passwords as multiline entries with password in the first line. Rest contains following data if they exist in the entry element of the xml file: - username - url - comment
2012-09-18Copyright and licensing info to keepassx2pass scriptJuhamatti Niemelä1-0/+4
2012-09-18Quote the template.Jason A. Donenfeld1-1/+1
2012-09-18Better dependency list.Jason A. Donenfeld1-1/+10
2012-09-18Make recursive make silent.Jason A. Donenfeld1-1/+1
2012-09-18Quote the program name.Jason A. Donenfeld1-4/+4
2012-09-17Abstract potentially platform specific commands into their own commands.Jason A. Donenfeld4-72/+97
2012-09-16Support recursive and forced removal.Jason A. Donenfeld2-12/+28
Laurent asked for this. Reported-by: Laurent Ghigonis <laurent@p1sec.com>
2012-09-16Small stylistic things.Jason A. Donenfeld1-9/+9
Reported-by: Laurent Ghigonis <laurent@p1sec.com>
2012-09-15Use --force flag in keepassx import.Jason A. Donenfeld1-1/+1