Exemplo n.º 1
0
	def testSupportsTableNotation(self):
		"""supports table notation"""
		text = ("|Foo|lorem|\n|Bar|ipsum|")
		expected = {
			"Foo": "lorem",
			"Bar": "ipsum"
		}
		self.assertEqual(expected, tiddlywiki.getSlices(text))
Exemplo n.º 2
0
	def testSupportsMixedNotation(self):
		"""supports mixed notation"""
		text = ("Foo: lorem\n|Bar|ipsum|")
		expected = {
			"Foo": "lorem",
			"Bar": "ipsum"
		}
		self.assertEqual(expected, tiddlywiki.getSlices(text))
Exemplo n.º 3
0
	def testSupportsColonNotation(self):
		"""supports colon notation"""
		text = "Foo: lorem\nBar: ipsum"
		expected = {
			"Foo": "lorem",
			"Bar": "ipsum"
		}
		self.assertEqual(expected, tiddlywiki.getSlices(text))
Exemplo n.º 4
0
	def testCapitalizesSliceNames(self): # XXX: deprecated
		"""capitalizes slice names"""
		text = ("foo: lorem\n" +
			"|bar|ipsum|")
		expected = {
			"Foo": "lorem",
			"Bar": "ipsum"
		}
		self.assertEqual(expected, tiddlywiki.getSlices(text))