-
-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a failing test for yaml issue #306
- Loading branch information
1 parent
20b7de3
commit 416461a
Showing
1 changed file
with
23 additions
and
0 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
yaml/src/test/java/com/fasterxml/jackson/dataformat/yaml/failing/NameQuoting306Test.java
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,23 @@ | ||
package com.fasterxml.jackson.dataformat.yaml.failing; | ||
|
||
import java.util.Collections; | ||
import java.util.Map; | ||
|
||
import com.fasterxml.jackson.dataformat.yaml.ModuleTestBase; | ||
import com.fasterxml.jackson.dataformat.yaml.YAMLMapper; | ||
|
||
// for [dataformats-text#306] | ||
public class NameQuoting306Test extends ModuleTestBase | ||
{ | ||
private final YAMLMapper MAPPER = newObjectMapper(); | ||
|
||
// for [dataformats-text#306] | ||
public void testComplexName() throws Exception | ||
{ | ||
final String key = "SomeKey:\nOtherLine"; | ||
Map<?,?> input = Collections.singletonMap(key, 302); | ||
final String doc = MAPPER.writeValueAsString(input); | ||
Map<?,?> actual = MAPPER.readValue(doc, Map.class); | ||
assertEquals(input, actual); | ||
} | ||
} |