Skip to content

Commit

Permalink
feat(debugging): support debug messages
Browse files Browse the repository at this point in the history
  • Loading branch information
olets committed Apr 5, 2020
1 parent e543d4a commit add63cb
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/tests.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ else
message+="failed"
fi
echo $message
echo

# Can erase an abbreviation
message="abbr --erase "
Expand All @@ -25,6 +26,7 @@ else
message+="failed"
fi
echo $message
echo

# Can add an abbreviation without the --add flag
message="abbr "
Expand All @@ -36,6 +38,7 @@ else
fi
echo $message
abbr -e $test_abbr_abbreviation
echo

# Can clear session abbreviations
message="abbr --clear-session "
Expand All @@ -47,6 +50,7 @@ else
message+="failed"
fi
echo $message
echo

# Can expand an abbreviation in a script
message="abbr --expand "
Expand All @@ -58,6 +62,7 @@ else
fi
echo $message
abbr -e $test_abbr_abbreviation
echo

# Can rename an abbreviation
message="abbr --rename "
Expand All @@ -70,6 +75,7 @@ else
fi
echo $message
abbr -e ${test_abbr_abbreviation}_new
echo

# Double-quoted single quotes are preserved
abbreviation=a
Expand All @@ -83,6 +89,7 @@ else
fi
echo $message
abbr -e $abbreviation
echo

# Single-quoted double quotes are preserved
abbreviation=a
Expand All @@ -96,6 +103,7 @@ else
fi
echo $message
abbr -e $abbreviation
echo

# Bare single quotes at the start of a string are swallowed
abbreviation=a
Expand All @@ -109,6 +117,7 @@ else
fi
echo $message
abbr -e $abbreviation
echo

# Bare single quotes in the middle of a string are swallowed
abbreviation=a
Expand All @@ -122,6 +131,7 @@ else
fi
echo $message
abbr -e $abbreviation
echo

# Bare double quotes at the start of a string are swallowed
abbreviation=a
Expand All @@ -135,6 +145,7 @@ else
fi
echo $message
abbr -e $abbreviation
echo

# Bare double quotes in the middle of a string are swallowed
abbreviation=a
Expand All @@ -148,5 +159,6 @@ else
fi
echo $message
abbr -e $abbreviation
echo

rm $ZSH_ABBR_USER_PATH
Loading

0 comments on commit add63cb

Please sign in to comment.