8000 Added tests for removing additional leading/trailing colons. · devandroid/chruby@c577af6 · GitHub
[go: up one dir, main page]

Skip to content

Commit c577af6

Browse files
committed
Added tests for removing additional leading/trailing colons.
1 parent dcda077 commit c577af6

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

test/chruby_reset_test.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,22 @@ test_chruby_reset_duplicate_path()
3838
assertEquals "PATH was not sanitized" "$TEST_PATH" "$PATH"
3939
}
4040

41+
test_chruby_reset_leading_colons()
42+
{
43+
export PATH=":::$PATH"
44+
45+
chruby_reset
46+
47+
assertEquals "PATH was not sanitized" "$TEST_PATH" "$PATH"
48+
}
49+
50+
test_chruby_reset_trailing_colons()
51+
{
52+
export PATH="$PATH:::"
53+
54+
chruby_reset
55+
56+
assertEquals "PATH was not sanitized" "$TEST_PATH" "$PATH"
57+
}
58+
4159
SHUNIT_PARENT=$0 . /usr/share/shunit2/shunit2

0 commit comments

Comments
 (0)
0