diff options
| author | danix <danix@danix.xyz> | 2026-06-11 09:43:47 +0200 |
|---|---|---|
| committer | danix <danix@danix.xyz> | 2026-06-11 09:43:47 +0200 |
| commit | 104ec07c142ac74e68ee2d72df662a0adcd5b9c5 (patch) | |
| tree | 01ab2f35ff4387de20140a99dac1346be009c798 /tests | |
| parent | 5f100a9a1a8e194f05ddace1b4a147c16abab8d5 (diff) | |
| download | wallp-104ec07c142ac74e68ee2d72df662a0adcd5b9c5.tar.gz wallp-104ec07c142ac74e68ee2d72df662a0adcd5b9c5.zip | |
feat: expand_tilde helper
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/wallp.bats | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/wallp.bats b/tests/wallp.bats index b92b3c2..1307eeb 100644 --- a/tests/wallp.bats +++ b/tests/wallp.bats @@ -26,3 +26,14 @@ teardown() { @test "harness sanity" { [ "x" = "x" ] } + +@test "expand_tilde expands leading tilde" { + run expand_tilde '~/pics/a.png' + [ "$status" -eq 0 ] + [ "$output" = "$HOME/pics/a.png" ] +} + +@test "expand_tilde leaves absolute path untouched" { + run expand_tilde '/abs/b.png' + [ "$output" = "/abs/b.png" ] +} |
