1
1
"""
2
- Copyright (c) 2017, 2019 , Oracle Corporation and/or its affiliates. All rights reserved .
2
+ Copyright (c) 2017, 2021 , Oracle and/or its affiliates.
3
3
Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
4
4
"""
5
5
import os
@@ -73,6 +73,7 @@ def testPythonToYaml(self):
73
73
pythonDict ['foo' ] = 'test \' legal\' yaml'
74
74
pythonDict ['bar' ] = 'test "legal" yaml'
75
75
pythonDict ['baz' ] = 'test \' legal\' yaml'
76
+ pythonDict ['newline' ] = 'test embedded\n newline yaml'
76
77
77
78
translator = PythonToFile (pythonDict )
78
79
translator .write_to_file (self ._target_yaml_file )
@@ -83,10 +84,13 @@ def testPythonToYaml(self):
83
84
self .assertEqual ('foo' in newPythonDict , True )
84
85
self .assertEqual ('bar' in newPythonDict , True )
85
86
self .assertEqual ('baz' in newPythonDict , True )
87
+ self .assertEquals ('newline' in newPythonDict , True )
86
88
87
89
quotedValue = newPythonDict ['foo' ]
88
90
self .assertEqual (quotedValue , 'test \' legal\' yaml' )
89
91
quotedValue = newPythonDict ['bar' ]
90
92
self .assertEqual (quotedValue , 'test "legal" yaml' )
91
93
quotedValue = newPythonDict ['baz' ]
92
94
self .assertEqual (quotedValue , 'test \' legal\' yaml' )
95
+ quotedValue = newPythonDict ['newline' ]
96
+ self .assertEqual (quotedValue , 'test embedded\n newline yaml' )
0 commit comments