Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

And I created a test procedure in my test APP with this code:

Code Block
	txa.Parse('embeds.txa')
	txa.GetEmbedData(DataQ,dataq.Text)
	gdbg.write('************** begin dump *******************')
	loop x = 1 to records(dataq)
		get(dataq,x)
		if clip(dataq.Text) <> ''
			gdbg.write('get(dataq,' & x & ')')
			gdbg.write('StringUtility.ReplaceSingleQuoteWithTilde(dataq.Text)')
			gdbg.write('AssertThat(dataq.Text,IsEqualto(''' & quote(dataq.Text) & '''),''Comparison error on line ' & x & ''')')
		END
	END
	gdbg.write('************** end dump *******************')

...

The generated text is test code I can paste back into my test procedure. Here's an excerpt:

Code Block
	get(dataq,1)
	StringUtility.ReplaceSingleQuoteWithTilde(dataq.Text)
	AssertThat(dataq.Text,IsEqualto('** Procedure: Global {34}'),'Comparison error on line 1')
	get(dataq,2)
	StringUtility.ReplaceSingleQuoteWithTilde(dataq.Text)
	AssertThat(dataq.Text,IsEqualto('* Embed: %AfterGlobalIncludes 4000'),'Comparison error on line 2')
	get(dataq,3)
	StringUtility.ReplaceSingleQuoteWithTilde(dataq.Text)
	AssertThat(dataq.Text,IsEqualto('-{90}'),'Comparison error on line 3')
	get(dataq,4)
	StringUtility.ReplaceSingleQuoteWithTilde(dataq.Text)
	AssertThat(dataq.Text,IsEqualto('!INCLUDE(~CharFileIO.Inc~), ONCE'),'Comparison error on line 4')
	get(dataq,5)
	StringUtility.ReplaceSingleQuoteWithTilde(dataq.Text)
	AssertThat(dataq.Text,IsEqualto('-{90}'),'Comparison error on line 5')

...