qspin / qtaste

[NEW RELEASE VERSION 3.0.0] The QTaste is an open-source functional and non-functional test environment offering services to developers and testers. It has been implemented following a data driven testing philosophy.
http://www.qtaste.org
GNU Lesser General Public License v3.0
6 stars 11 forks source link

PropertiesHistory.checkPropertyValueOrTransition() doesn't support semicolon in values #233

Open dergo opened 5 years ago

dergo commented 5 years ago

PropertiesHistory.checkPropertyValueOrTransition() doesn't support semicolon in values, which happens e.g. if value is a URL, if it's the case it throws a QTasteDataException("Invalid syntax").

This is due to the following code:

    String[] splitted = propertyValueOrTransition.split(" *: *");
    if (splitted.length != 2) {
        throw new QTasteDataException("Invalid syntax");
    }
dergo commented 5 years ago
  propertyValueOrTransition.split(" *: *");

should be replaced by

  propertyValueOrTransition.split(" *: *", 2);
dergo commented 5 years ago

Fixed.

dergo commented 5 years ago

Also had to change

  String expectedValueOrTransition = propertyValueOrTransition.replaceFirst(".*: *", "");

to

  String expectedValueOrTransition = propertyValueOrTransition.replaceFirst(".*?: *", "");