From b12e68563f6530c35b7dc8d1aa2a365ecc0f39e6 Mon Sep 17 00:00:00 2001 From: Julian Hofer Date: Fri, 6 Sep 2024 19:18:02 +0200 Subject: [PATCH] Fix typos on deno_task_shell Also add todo, that we should test everything --- .github/workflows/rust-tests.yml | 1 + crates/deno_task_shell/src/shell/execute.rs | 2 +- crates/deno_task_shell/src/shell/test.rs | 8 ++++---- typos.toml | 1 - 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/rust-tests.yml b/.github/workflows/rust-tests.yml index 1da39b0..5cf3a77 100644 --- a/.github/workflows/rust-tests.yml +++ b/.github/workflows/rust-tests.yml @@ -27,4 +27,5 @@ jobs: override: true - name: Run tests + # TODO: run on whole workspace with "cargo test --workspace --all-targets" run: cargo test --manifest-path crates/shell/Cargo.toml --all-targets diff --git a/crates/deno_task_shell/src/shell/execute.rs b/crates/deno_task_shell/src/shell/execute.rs index b493130..cd988ef 100644 --- a/crates/deno_task_shell/src/shell/execute.rs +++ b/crates/deno_task_shell/src/shell/execute.rs @@ -77,7 +77,7 @@ pub async fn execute( /// Executes a `SequentialList` of commands with specified input and output pipes. /// /// This function accepts a list of commands, a shell state, and pipes for standard input, output, and error. -/// This function allows the user to retrive the data outputted by the execution and act on it using code. +/// This function allows the user to retrieve the data outputted by the execution and act on it using code. /// This is made public for the use-case of running tests with shell execution in application depending on the library. /// /// # Arguments diff --git a/crates/deno_task_shell/src/shell/test.rs b/crates/deno_task_shell/src/shell/test.rs index 64d05fa..bdb9f73 100644 --- a/crates/deno_task_shell/src/shell/test.rs +++ b/crates/deno_task_shell/src/shell/test.rs @@ -5,7 +5,7 @@ use futures::FutureExt; use super::test_builder::TestBuilder; use super::types::ExecuteResult; -const FOLDER_SEPERATOR: char = if cfg!(windows) { '\\' } else { '/' }; +const FOLDER_SEPARATOR: char = if cfg!(windows) { '\\' } else { '/' }; #[tokio::test] async fn commands() { @@ -274,7 +274,7 @@ async fn async_commands() { } #[tokio::test] -async fn command_substition() { +async fn command_substitution() { TestBuilder::new() .command("echo $(echo 1)") .assert_stdout("1\n") @@ -659,7 +659,7 @@ async fn pwd() { .command("pwd && cd sub_dir && pwd && cd ../ && pwd") // the actual temp directory will get replaced here .assert_stdout(&format!( - "$TEMP_DIR\n$TEMP_DIR{FOLDER_SEPERATOR}sub_dir\n$TEMP_DIR\n" + "$TEMP_DIR\n$TEMP_DIR{FOLDER_SEPARATOR}sub_dir\n$TEMP_DIR\n" )) .run() .await; @@ -684,7 +684,7 @@ async fn subshells() { .directory("sub_dir") .command("echo $PWD && (cd sub_dir && echo $PWD) && echo $PWD") .assert_stdout(&format!( - "$TEMP_DIR\n$TEMP_DIR{FOLDER_SEPERATOR}sub_dir\n$TEMP_DIR\n" + "$TEMP_DIR\n$TEMP_DIR{FOLDER_SEPARATOR}sub_dir\n$TEMP_DIR\n" )) .assert_exit_code(0) .run() diff --git a/typos.toml b/typos.toml index 323e500..ab94891 100644 --- a/typos.toml +++ b/typos.toml @@ -3,6 +3,5 @@ extend-exclude = [ ".git/", ".pixi/", "**/*.snap", - "crates/deno_task_shell", ] ignore-hidden = false