Skip to content

Commit

Permalink
tests: add test for args added to alias
Browse files Browse the repository at this point in the history
  • Loading branch information
JPHutchins committed Dec 30, 2023
1 parent 355f64b commit 9a410b1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/fixtures/aliases
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
hello=echo Hello world!
user_alias=echo PWNED
with_equals=echo --log-level=NOTICE
args=echo
1 change: 1 addition & 0 deletions tests/sh/test_aliases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ assertEqual "$OLD_PATH" "$PATH"
assertEqual "$(user_alias)" "PWNED"
assertEqual "$(hello)" "Hello world!"
assertEqual "$(with_equals)" "--log-level=NOTICE"
assertEqual "$(args User args)" "User args"

# cut off the leading characters
if [[ -n "${BASH:-}" ]] ; then
Expand Down
1 change: 1 addition & 0 deletions tests/windows/test_aliases.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ function global:aliases () {
$TEST_RES += assertEqual "Hello world!" $(hello)
$TEST_RES += assertEqual "PWNED" $(user_alias)
$TEST_RES += assertEqual "--log-level=NOTICE" $(with_equals)
$TEST_RES += assertEqual "User args" $(args "User args")

unsource

Expand Down

0 comments on commit 9a410b1

Please sign in to comment.