1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2025-12-17 14:37:02 +00:00

aliases: Treat empty pipe aliases as bad lines and skip them

A pipe alias must have a command, if it doesn't, we should treat the
line as bad and skip it like we do for others.
This commit is contained in:
Alberto Bertogli
2019-10-22 22:05:52 +01:00
parent 5f72f723db
commit dea6f73164
2 changed files with 8 additions and 0 deletions

View File

@@ -198,6 +198,10 @@ func TestAddFile(t *testing.T) {
{"a: c@d, e@f, g\n",
[]Recipient{{"c@d", EMAIL}, {"e@f", EMAIL}, {"g@dom", EMAIL}}},
// Invalid pipe aliases, should be ignored.
{"a:|\n", []Recipient{{"a@dom", EMAIL}}},
{"a:| \n", []Recipient{{"a@dom", EMAIL}}},
}
for _, c := range cases {