aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorboastful-squirrel <boastful.squirrel@gmail.com>2019-05-02 05:23:18 +0000
committerboastful-squirrel <boastful.squirrel@gmail.com>2019-05-02 05:23:18 +0000
commit2011cdc6f140122735d2ec0b67cf70776588067c (patch)
tree25798a6738fdd24f36de487ea610a46cdbfaac4b
parentRename p404 (diff)
downloadminiserve-2011cdc6f140122735d2ec0b67cf70776588067c.tar.gz
miniserve-2011cdc6f140122735d2ec0b67cf70776588067c.zip
Added rustfmt_skip directive on tests
Diffstat (limited to '')
-rw-r--r--src/args.rs6
-rw-r--r--src/auth.rs8
2 files changed, 4 insertions, 10 deletions
diff --git a/src/args.rs b/src/args.rs
index d37e429..5671425 100644
--- a/src/args.rs
+++ b/src/args.rs
@@ -161,6 +161,7 @@ pub fn parse_args() -> crate::MiniserveConfig {
}
}
+#[cfg_attr(rustfmt, rustfmt_skip)]
#[cfg(test)]
mod tests {
use super::*;
@@ -183,10 +184,7 @@ mod tests {
}
#[rstest_parametrize(
- auth_string,
- username,
- password,
- encrypt,
+ auth_string, username, password, encrypt,
case("username:password", "username", "password", "plain"),
case("username:sha256:abcd", "username", "abcd", "sha256"),
case("username:sha512:abcd", "username", "abcd", "sha512")
diff --git a/src/auth.rs b/src/auth.rs
index faf967c..502c9cb 100644
--- a/src/auth.rs
+++ b/src/auth.rs
@@ -163,6 +163,7 @@ fn build_unauthorized_response(
.into_string()
}
+#[cfg_attr(rustfmt, rustfmt_skip)]
#[cfg(test)]
mod tests {
use super::*;
@@ -205,12 +206,7 @@ mod tests {
}
#[rstest_parametrize(
- should_pass,
- param_username,
- param_password,
- required_username,
- required_password,
- encrypt,
+ should_pass, param_username, param_password, required_username, required_password, encrypt,
case(true, "obi", "hello there", "obi", "hello there", "plain"),
case(false, "obi", "hello there", "obi", "hi!", "plain"),
case(true, "obi", "hello there", "obi", "hello there", "sha256"),