11"""
2- Copyright (c) 2017, 2019 , Oracle Corporation and/or its affiliates. All rights reserved .
2+ Copyright (c) 2017, 2021 , Oracle and/or its affiliates.
33Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
44"""
55import os
@@ -73,6 +73,7 @@ def testPythonToYaml(self):
7373 pythonDict ['foo' ] = 'test \' legal\' yaml'
7474 pythonDict ['bar' ] = 'test "legal" yaml'
7575 pythonDict ['baz' ] = 'test \' legal\' yaml'
76+ pythonDict ['newline' ] = 'test embedded\n newline yaml'
7677
7778 translator = PythonToFile (pythonDict )
7879 translator .write_to_file (self ._target_yaml_file )
@@ -83,10 +84,13 @@ def testPythonToYaml(self):
8384 self .assertEqual ('foo' in newPythonDict , True )
8485 self .assertEqual ('bar' in newPythonDict , True )
8586 self .assertEqual ('baz' in newPythonDict , True )
87+ self .assertEquals ('newline' in newPythonDict , True )
8688
8789 quotedValue = newPythonDict ['foo' ]
8890 self .assertEqual (quotedValue , 'test \' legal\' yaml' )
8991 quotedValue = newPythonDict ['bar' ]
9092 self .assertEqual (quotedValue , 'test "legal" yaml' )
9193 quotedValue = newPythonDict ['baz' ]
9294 self .assertEqual (quotedValue , 'test \' legal\' yaml' )
95+ quotedValue = newPythonDict ['newline' ]
96+ self .assertEqual (quotedValue , 'test embedded\n newline yaml' )
0 commit comments