How would one concatenate a symbol with text on either side? For example:
- Prefix:
"GAR_"
- Variable:
$todayDate
- Suffix:
"_1"
GAR_$todayDate_1
Which would evaluate to:
GAR_07202012_1
When running the test in fitnesse, it seems as though the concatenation is working (GAR_$todayDate->[07202012]_1
). However, I am passing this value as a parameter to visual studio and I instead end up with the following text: GAR_$todayDate_1
.
When I remove the suffix or put a space between $todayDate
and "_1"
, everything works as expected.
Any help would be appreciated.
Things I have tried:
GAR_!-$todayDate-!_1
GAR_$todayDate!-_1-!
GAR_$todayDate${SUFFIX}
- static variable defined
Thanks, Mike
I am stuck with the same problem currently. The only way I found was to:
StringSupport
class with aString concatenate(String s1, String s2)
methodimport
the package of that class in your FitNesse testStringSupport
in the available libraries in your FitNesse test with theLibrary
tableScript
, you can now do:|$result=|concatenate;|$s1|$s2|
To fit your exact use case, you just have to do the same concatenate() with 3 strings instead of just one.