Skip to content

Instantly share code, notes, and snippets.

@hugopeixoto
Created May 17, 2016 00:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hugopeixoto/ab86aaa43b9c0ac1bf6b6ed66a2a548a to your computer and use it in GitHub Desktop.
Save hugopeixoto/ab86aaa43b9c0ac1bf6b6ed66a2a548a to your computer and use it in GitHub Desktop.
#!/usr/bin/env sh
assert() {
R="$(tico "$1")"
if [ ! "$R" = "$2" ]; then
echo "error on tico $1"
echo " expected $2"
echo " actual $R"
exit 1
fi
}
assert "~" "~"
assert "/" "/"
assert "/home/hugopeixoto/work/personal/tico" "/h/h/w/p/tico"
assert "~/work/personal/tico" "~/w/p/tico"
assert "~/work/personal/tico/" "~/w/p/t/"
assert "~/work/ééé/tico" "~/w/é/tico"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment