Skip to content

Commit

Permalink
Add test for inner-word colons
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Nov 19, 2014
1 parent e6bcd5b commit 1e2350b
Show file tree
Hide file tree
Showing 2 changed files with 121 additions and 0 deletions.
114 changes: 114 additions & 0 deletions test/fixture/word-inner-colon.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
{
"type": "RootNode",
"children": [
{
"type": "ParagraphNode",
"children": [
{
"type": "SentenceNode",
"children": [
{
"type": "WordNode",
"children": [
{
"type": "TextNode",
"value": "You"
}
]
},
{
"type": "WhiteSpaceNode",
"value": " "
},
{
"type": "WordNode",
"children": [
{
"type": "TextNode",
"value": "will"
}
]
},
{
"type": "WhiteSpaceNode",
"value": " "
},
{
"type": "WordNode",
"children": [
{
"type": "TextNode",
"value": "need"
}
]
},
{
"type": "WhiteSpaceNode",
"value": " "
},
{
"type": "WordNode",
"children": [
{
"type": "TextNode",
"value": "to"
}
]
},
{
"type": "WhiteSpaceNode",
"value": " "
},
{
"type": "WordNode",
"children": [
{
"type": "TextNode",
"value": "arrive"
}
]
},
{
"type": "WhiteSpaceNode",
"value": " "
},
{
"type": "WordNode",
"children": [
{
"type": "TextNode",
"value": "by"
}
]
},
{
"type": "WhiteSpaceNode",
"value": " "
},
{
"type": "WordNode",
"children": [
{
"type": "TextNode",
"value": "14"
},
{
"type": "PunctuationNode",
"value": ":"
},
{
"type": "TextNode",
"value": "30"
}
]
},
{
"type": "PunctuationNode",
"value": "."
}
]
}
]
}
]
}
7 changes: 7 additions & 0 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1325,6 +1325,13 @@ describe('Inner-word punctuation', function () {
);
});

it('should merge a colon in a word', function () {
describeFixture(
'word-inner-colon',
'You will need to arrive by 14:30.'
);
});

it('should merge URL-symbols, like `?` and `=`', function () {
describeFixture(
'word-inner-url',
Expand Down

0 comments on commit 1e2350b

Please sign in to comment.