Skip to content

Commit c44ff63

Browse files
committed
Add test for style variation in subfolder
Signed-off-by: Pascal Birchler <pascalb@google.com>
1 parent 08a807e commit c44ff63

1 file changed

Lines changed: 24 additions & 2 deletions

File tree

features/makepot.feature

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3809,7 +3809,7 @@ Feature: Generate a POT file of a WordPress project
38093809
}
38103810
}
38113811
"""
3812-
And a foo-theme/incorrect/styles/my-style.json file:
3812+
And a foo-theme/styles/deeply/nested/variation.json file:
38133813
"""
38143814
{
38153815
"version": "1",
@@ -3826,6 +3826,23 @@ Feature: Generate a POT file of a WordPress project
38263826
}
38273827
}
38283828
"""
3829+
And a foo-theme/incorrect/styles/my-style.json file:
3830+
"""
3831+
{
3832+
"version": "1",
3833+
"settings": {
3834+
"blocks": {
3835+
"core/paragraph": {
3836+
"color": {
3837+
"palette": [
3838+
{ "slug": "red", "color": "#ff00000", "name": "Red" }
3839+
]
3840+
}
3841+
}
3842+
}
3843+
}
3844+
}
3845+
"""
38293846

38303847
When I try `wp i18n make-pot foo-theme`
38313848
Then STDOUT should contain:
@@ -3838,10 +3855,15 @@ Feature: Generate a POT file of a WordPress project
38383855
msgctxt "Color name"
38393856
msgid "Black"
38403857
"""
3841-
And the foo-theme/foo-theme.pot file should not contain:
3858+
And the foo-theme/foo-theme.pot file should contain:
38423859
"""
3860+
msgctxt "Color name"
38433861
msgid "White"
38443862
"""
3863+
And the foo-theme/foo-theme.pot file should not contain:
3864+
"""
3865+
msgid "Red"
3866+
"""
38453867

38463868
Scenario: Extract strings from the patterns directory
38473869
Given an empty foo-theme/patterns directory

0 commit comments

Comments
 (0)