Exemplo n.º 1
0
	def testDecodesLegacyTiddlers(self):
		"""_get_text decodes legacy-store tiddlers' contents"""
		doc = _getTiddlyWiki("legacy")
		tiddlers = main._get_tiddler_elements(doc)
		actual = main._get_text(tiddlers[0])
		expected = u"l\xf6rem ips\xfcm\n\nd\xc5lor s\xe4t\n\xe6met"
		self.assertEqual(expected, actual)
Exemplo n.º 2
0
	def testSupportsModernStore(self):
		"""_get_text supports modern (v2.2+) store format"""
		doc = _getTiddlyWiki("modern")
		tiddlers = main._get_tiddler_elements(doc)
		actual = main._get_text(tiddlers[0])
		expected = u"l\xf6rem ips\xfcm\n\nd\xc5lor s\xe4t\n\xe6met"
		self.assertEqual(expected, actual)
Exemplo n.º 3
0
	def testSupportsLegacyStore(self):
		"""_get_text supports legacy (pre-v2.2) store format"""
		doc = _getTiddlyWiki("legacy")
		tiddlers = main._get_tiddler_elements(doc)
		actual = main._get_text(tiddlers[1])
		expected = u"consectetur adipisicing elit"
		self.assertEqual(expected, actual)
Exemplo n.º 4
0
	def testReturnsTiddlerContents(self):
		"""_get_text returns tiddler elements' contents"""
		doc = _getTiddlyWiki("modern")
		tiddlers = main._get_tiddler_elements(doc)
		actual = main._get_text(tiddlers[1])
		expected = u"consectetur adipisicing elit"
		self.assertEqual(expected, actual)