-
-
Notifications
You must be signed in to change notification settings - Fork 376
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Starter Commit * Cleanup * Change to Error Error instead of warn * Test * More Tests * Test Update * Remove - --------- Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com> Co-authored-by: Moderocky <admin@moderocky.com> Co-authored-by: Efnilite <35348263+Efnilite@users.noreply.github.com>
- Loading branch information
1 parent
75d0701
commit fde4408
Showing
2 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
|
||
command /prettyquotecommandtest “prettyquoteliteral” <text>: | ||
trigger: | ||
set {PrettyQuoteArg} to arg | ||
|
||
test "pretty quote usage": | ||
set {_error} to "Pretty quotes are not allowed, change to regular quotes" | ||
parse: | ||
set {_test} to "“Embedded Pretty Quotes”" | ||
assert last parse logs does not contain {_error} with "Pretty quotes should work inside strings" | ||
|
||
parse: | ||
set {_test} to "" #“Pretty Quote Comment” | ||
assert last parse logs does not contain {_error} with "Pretty quotes should work in comments" | ||
|
||
parse: | ||
set {_test“”} to "" | ||
assert last parse logs does not contain {_error} with "Pretty quotes should work in var names" | ||
|
||
parse: | ||
set {_test} to “Pretty Quotes” | ||
assert last parse logs contain {_error} with "Pretty quote string usage did not produce expected error" | ||
|
||
parse: | ||
set {_test} to "test%“test”%" | ||
assert last parse logs contain {_error} with "Pretty quote %%string%% usage did not produce expected error" | ||
|
||
execute command "prettyquotecommandtest “prettyquoteliteral” “prettyquotearg”" | ||
assert {PrettyQuoteArg} is "“prettyquotearg”" with "Pretty quotes should work in command args" | ||
clear {PrettyQuoteArg} |