🏡 index : ~doyle/pisshoff.git

author Jordan Doyle <jordan@doyle.la> 2024-02-17 14:22:41.0 +00:00:00
committer Jordan Doyle <jordan@doyle.la> 2024-02-17 14:22:41.0 +00:00:00
commit
55ef7733199976d383fd0c3cf874e242997ac067 [patch]
tree
1cd9f97ca1d882e0e7871cde6499e6461ec26468
parent
00d6f919b97cf3889220ebb6ed05db373cae1189
download
55ef7733199976d383fd0c3cf874e242997ac067.tar.gz

Fix clippy in tests



Diff

 pisshoff-server/src/command/cat.rs            | 2 +-
 pisshoff-server/src/command/scp.rs            | 2 +-
 pisshoff-server/src/subsystem/shell/parser.rs | 8 ++++----
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/pisshoff-server/src/command/cat.rs b/pisshoff-server/src/command/cat.rs
index efd3d0b..dc258f8 100644
--- a/pisshoff-server/src/command/cat.rs
+++ b/pisshoff-server/src/command/cat.rs
@@ -79,7 +79,7 @@ impl Command for Cat {
mod test {
    use std::path::Path;

    use mockall::predicate::{self, always};
    use mockall::predicate::always;

    use crate::{
        command::{cat::Cat, Command, CommandResult},
diff --git a/pisshoff-server/src/command/scp.rs b/pisshoff-server/src/command/scp.rs
index 67eb7b6..745c10e 100644
--- a/pisshoff-server/src/command/scp.rs
+++ b/pisshoff-server/src/command/scp.rs
@@ -373,7 +373,7 @@ mod test {
            .unwrap_stdin();

        insta::with_settings!({filters => vec![
            (r#"\bstart_offset: [^,]+"#, "start_offset: [stripped]")
            (r"\bstart_offset: [^,]+", "start_offset: [stripped]")
        ]}, {
            assert_debug_snapshot!(state.audit_log());
        });
diff --git a/pisshoff-server/src/subsystem/shell/parser.rs b/pisshoff-server/src/subsystem/shell/parser.rs
index 6ff1b69..006fb5b 100644
--- a/pisshoff-server/src/subsystem/shell/parser.rs
+++ b/pisshoff-server/src/subsystem/shell/parser.rs
@@ -316,7 +316,7 @@ mod test {
            assert!(rest.is_empty());

            let state = ConnectionState::mock();
            let mut command = Iter::new(s.into());
            let mut command = Iter::new(s);

            // once we step we should be requested to execute `echo hello` for subbing
            let step = command.step(state.environment(), None);
@@ -346,7 +346,7 @@ mod test {
            assert!(rest.is_empty());

            let state = ConnectionState::mock();
            let mut command = Iter::new(s.into());
            let mut command = Iter::new(s);

            // once we step we should be requested to execute `echo the whole` for subbing
            let step = command.step(state.environment(), None);
@@ -504,7 +504,7 @@ mod test {
                    ParsedPart::Break,
                    ParsedPart::String(Cow::Borrowed(b"hello")),
                ])
            )
            );
        }
    }

@@ -557,7 +557,7 @@ mod test {
                    ])),
                    ParsedPart::String(Cow::Borrowed(b" test")),
                ]
            )
            );
        }

        #[test]