Exemple #1
0
 def test_should_identify_and_unindent_basic_json(self):
     formatter = GeneralFormatter()
     formattedText = formatter.unindent(
         '{\n\t"hello": "world",\n\t"value": 123\n}')
     expect(formattedText).to_equal('{"hello":"world","value":123}')
Exemple #2
0
 def test_should_identify_and_unindent_basic_xml(self):
     formatter = GeneralFormatter()
     formattedText = formatter.unindent(
         '<root>\n\t<child\na="123"></child>\n</root>')
     expect(formattedText).to_equal('<root><child a="123"></child></root>')
 def test_should_identify_and_unindent_basic_json(self):
     formatter = GeneralFormatter()
     formattedText = formatter.unindent('{\n\t"hello": "world",\n\t"value": 123\n}')
     expect(formattedText).to_equal('{"hello":"world","value":123}')
Exemple #4
0
 def format(self, text, options):
     formatter = GeneralFormatter()
     formattedText = formatter.unindent(text)
     return formattedText
 def test_should_identify_and_unindent_basic_xml(self):
     formatter = GeneralFormatter()
     formattedText = formatter.unindent('<root>\n\t<child\na="123"></child>\n</root>')
     expect(formattedText).to_equal('<root><child a="123"></child></root>')