diff options
| author | Teddy Wing | 2016-04-21 16:49:18 -0400 |
|---|---|---|
| committer | Teddy Wing | 2016-04-21 16:49:18 -0400 |
| commit | 3a5b7dd83642f5ab93aa70b612dcdbbc10e70935 (patch) | |
| tree | 3acccfa2ad6b5b0f088e98baa9c5dce77285e922 /src/tests.rs | |
| parent | 222ade989e6d723435e60ff8e5d60a64b3003af3 (diff) | |
| download | mutt-alias-auto-add-3a5b7dd83642f5ab93aa70b612dcdbbc10e70935.tar.bz2 | |
find_alias_in_file: Return list of aliases not alias lines
My next step is to get the list produced by this function and use it to
build a new alias of `#{alias}-#{id + 1}`.
In trying to figure out how best to do that, I realised that it would be
easier to do if I had actual aliases to work with instead of full Mutt
alias lines that I'd have to parse (again).
Update our function to give us a list of aliases instead of full alias
lines.
Diffstat (limited to 'src/tests.rs')
| -rw-r--r-- | src/tests.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tests.rs b/src/tests.rs index df61825..0dc3901 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -75,8 +75,8 @@ fn find_alias_in_file_alias_is_new() { fn find_alias_in_file_finds_a_match() { assert_eq!( Ok(vec![ - "alias farnsworth-hubert Hubert Farnsworth <professor@planetexpress.com>".to_owned(), - "alias farnsworth-hubert-2 Hubert Farnsworth <davincifan@planetexpress.com>".to_owned() + "farnsworth-hubert".to_owned(), + "farnsworth-hubert-2".to_owned() ]), find_alias_in_file( &Alias { |
