Tommy, I am afraid I do not quite follow you. The assert seems to work all right, far as I can say:
=== 1029 ocs /tmp> <q.groovy def msg="'LAZY DEVELOPER! This is a test'" assert msg == "'" +"LAZY DEVELOPER! This is a test" + "'" println 'all ok' 1030 ocs /tmp> /usr/local/groovy-4.0.21/bin/groovy q all ok 1031 ocs /tmp> === Do I overlook something of importance here? All the best, OC > On 13. 5. 2024, at 18:45, Tommy Svensson <to...@natusoft.se> wrote: > > Here is a test I have been forced to comment out since it is 100% impossible > to make work due to ' character keeps getting removed! > > assert se3.message == "'" +"LAZY DEVELOPER! This is a test" + "'" > > > No matter what you do here the result will be: > > Assertion failed: > > assert se3.message == "'" +"LAZY DEVELOPER! This is a test" + > "'" > | | > | 'LAZY DEVELOPER! This is a Test' > LAZY DEVELOPER! This is a Test > > That is the "'" character will be removed in the constant > comparison text > and thus the test will always fail, not matter what I do!!! > > Any suggestions ? > > I'm using release 21 of Groovy. > > ______________________ > Tommy Svensson > to...@natusoft.se <mailto:to...@natusoft.se>