-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added new tests for shortcodes (especially keyworded arguments)
- Loading branch information
Showing
11 changed files
with
99 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
This test demonstrates how to force the "first / next use" in shortcodes. | ||
|
||
The `first_use` argument accepts "boolean" strings: | ||
|
||
- `true` | ||
- `false` | ||
- `yes` | ||
- `no` | ||
- `y` | ||
- `n` | ||
|
||
It is also case-insensitive: `true`, `TRUE`, and `tRuE` are identical. |
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,14 @@ | ||
# List Of Acronyms {#acronyms_HEADER_LOA .loa} | ||
|
||
[RL]{#acronyms_RL} | ||
: Reinforcement Learning | ||
|
||
# Introduction {#intro} | ||
|
||
This paragraph mentions [Reinforcement Learning (RL)](#acronyms_RL) for the first time. | ||
|
||
And now, in this paragraph, [RL](#acronyms_RL) is in short form. | ||
|
||
Here, we force the first use again: [Reinforcement Learning (RL)](#acronyms_RL). | ||
|
||
And here in "next use" (also case-insensitive): [RL](#acronyms_RL). |
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,16 @@ | ||
--- | ||
acronyms: | ||
keys: | ||
- shortname: RL | ||
longname: Reinforcement Learning | ||
--- | ||
|
||
# Introduction {#intro} | ||
|
||
This paragraph mentions {{< acr RL >}} for the first time. | ||
|
||
And now, in this paragraph, {{< acr RL >}} is in short form. | ||
|
||
Here, we force the first use again: {{< acr RL first_use=true >}}. | ||
|
||
And here in "next use" (also case-insensitive): {{< acr RL first_use=FaLSe >}}. |
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,12 @@ | ||
This test demonstrates how to force insertion of links in shortcodes. | ||
|
||
The `insert_links` argument accepts "boolean" strings: | ||
|
||
- `true` | ||
- `false` | ||
- `yes` | ||
- `no` | ||
- `y` | ||
- `n` | ||
|
||
It is also case-insensitive: `true`, `TRUE`, and `tRuE` are identical. |
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,10 @@ | ||
# List Of Acronyms {#acronyms_HEADER_LOA .loa} | ||
|
||
[RL]{#acronyms_RL} | ||
: Reinforcement Learning | ||
|
||
# Introduction {#intro} | ||
|
||
This paragraph has a link: [Reinforcement Learning (RL)](#acronyms_RL). | ||
|
||
But this one will not: RL. |
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,12 @@ | ||
--- | ||
acronyms: | ||
keys: | ||
- shortname: RL | ||
longname: Reinforcement Learning | ||
--- | ||
|
||
# Introduction {#intro} | ||
|
||
This paragraph has a link: {{< acr RL insert_links=true >}}. | ||
|
||
But this one will not: {{< acr RL insert_links=false >}}. |
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,2 @@ | ||
This test demonstrates how to choose the behaviour when an acronym is not found | ||
with shortcodes. |
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,7 @@ | ||
# List Of Acronyms {#acronyms_HEADER_LOA .loa} | ||
|
||
# Introduction {#intro} | ||
|
||
The non-existing acronym will be replaced by "??": ??. | ||
|
||
Here, with its key: RL. |
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,2 @@ | ||
(W) [acronyms] Acronym key RL not recognized | ||
(W) [acronyms] Acronym key RL not recognized |
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,9 @@ | ||
--- | ||
acronyms: {} | ||
--- | ||
|
||
# Introduction {#intro} | ||
|
||
The non-existing acronym will be replaced by "??": {{< acr RL non_existing=?? >}}. | ||
|
||
Here, with its key: {{< acr RL non_existing=key >}}. |
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