Assert:equals ignores trailing spaces, bug or feature

Posted by cverbiest on 24-Jul-2015 03:37

Following assert does not fail

Assert:Equals("abc", "abc    ").


Is this a bug, or is there a reason why trailing spaces are ignored ?

All Replies

Posted by James Palmer on 24-Jul-2015 03:41

ABL has ignored trailing white space for a while now, so I'm not surprised:

message "abc" eq "abc     " view-as alert-box. 


Posted by Simon L. Prinsloo on 24-Jul-2015 05:44

That is pretty much what I would expect.

Ever since I work with Progress (v. 7) the following would be true:

MESSAGE "AA" = "AA   "
VIEW-AS ALERT-BOX.


I believe it dates from an earlier version, where the following was invalid:

IF cVar = "" THEN ...


That would result in the first quote escaping the second quote or something. The correct test for an empty string was apparently:

IF cVar = " " THEN ...


This thread is closed