Skip to content

Commit

Permalink
Fix typos on deno_task_shell (#40)
Browse files Browse the repository at this point in the history
Also add todo, that we should test everything
  • Loading branch information
Hofer-Julian authored Sep 6, 2024
1 parent f484c18 commit 6dfb9fa
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/workflows/rust-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion crates/deno_task_shell/src/shell/execute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions crates/deno_task_shell/src/shell/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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;
Expand All @@ -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()
Expand Down
1 change: 0 additions & 1 deletion typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ extend-exclude = [
".git/",
".pixi/",
"**/*.snap",
"crates/deno_task_shell",
]
ignore-hidden = false

0 comments on commit 6dfb9fa

Please sign in to comment.