aboutsummaryrefslogtreecommitdiff
path: root/pkg/config/url_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/config/url_test.go')
-rw-r--r--pkg/config/url_test.go18
1 files 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
the path too.Jason A. Donenfeld1-1/+1 2012-09-04Allow passwords having spaces to go unbroken to the clipboard.Bernardo Freitas Paulo da Costa1-1/+1 2012-09-04Separate out the massive git example.Jason A. Donenfeld1-10/+14 2012-09-04Prepare for debianification.1.0Jason A. Donenfeld9-4/+60 2012-09-03Fix readme typo.Jason A. Donenfeld1-1/+1 2012-09-03Show program name properly in error message.Jason A. Donenfeld1-1/+1 2012-09-03Move examples into manpage.Jason A. Donenfeld4-93/+224 2012-09-03Make into a real project.Jason A. Donenfeld8-5/+173 2012-09-03Support pass gitJason A. Donenfeld2-1/+15 2012-08-31Add remove synonyms.Jason A. Donenfeld1-2/+2 2012-08-31Use basename in usage.Jason A. Donenfeld1-2/+1 2012-08-19now using gpg_id as a varMatthew Ramirez1-2/+2 2012-08-07Forty five seconds.Jason A. Donenfeld1-1/+1 2012-08-06Deal with klipper and new lines.Jason A. Donenfeld1-3/+19 2012-08-06Update examples.Jason A. Donenfeld1-7/+7 2012-08-06Update readme.Jason A. Donenfeld1-11/+13 2012-08-06Be slicker and more like git.Jason A. Donenfeld1-114/+173