mirror of
https://git.meli.delivery/meli/meli
synced 2024-10-30 21:20:34 +00:00
conf: add IMAP config in config parse test
This commit is contained in:
parent
e6d6e1f588
commit
0f6f3e30c6
18
src/conf.rs
18
src/conf.rs
@ -1176,6 +1176,18 @@ format = "mbox"
|
||||
index_style = "Compact"
|
||||
identity="username@hostname.local"
|
||||
|
||||
[composing]
|
||||
send_mail = '/bin/false'
|
||||
"#;
|
||||
const IMAP_CONFIG: &str = r#"
|
||||
[accounts.imap]
|
||||
root_mailbox = "INBOX"
|
||||
format = "imap"
|
||||
identity="username@example.com"
|
||||
server_username = "null"
|
||||
server_hostname = "example.com"
|
||||
server_password_command = "/bin/false"
|
||||
|
||||
[composing]
|
||||
send_mail = '/bin/false'
|
||||
"#;
|
||||
@ -1227,6 +1239,12 @@ send_mail = '/bin/false'
|
||||
"Unrecognised configuration values: {\"index_style\": \"Compact\"}"
|
||||
);
|
||||
|
||||
/* Test IMAP config */
|
||||
|
||||
let new_file = ConfigFile::new(IMAP_CONFIG).unwrap();
|
||||
FileSettings::validate(new_file.path.clone(), false, true)
|
||||
.expect("could not parse IMAP config");
|
||||
|
||||
/* Test sample config */
|
||||
|
||||
let example_config = EXAMPLE_CONFIG.replace("\n#", "\n");
|
||||
|
Loading…
Reference in New Issue
Block a user