11-06-2009 05:16 AM
I am using TestStand 3.5. I want to print "sw\test\nis" in the final report. I am using Step.Result.ReporText = "sw\test\nis".
But in the final report, \t in the string is recognized as tab and the final report displaying is
sw est\nis.
One option is to use a variable and store its value before executing the sequence, but I want to use it at runtime.
Can you please help how I can achieve this functionality?
11-06-2009 07:03 AM
You need to take care about escape characters.
Norbert
11-06-2009 08:58 AM
NOTE:
1) String literals in expressions, as in many C-based programming languages, use the '\' character as an escape character, thus the string you need if using an expression string literal is "sw\\test\\nis"
2) Setting string variables directly in the variables view however does not involve escaping so when you are setting a string variable directly in the variables view using sw\test\nis is what you want.
Hope this helps,
-Doug
11-09-2009 12:29 AM
Ecape character works.
Thanks for your help