B2G/gecko/services/sync/tps/extensions/mozmill/resource/modules/assertions.js
/**
   * Test if the regular expression does not match the string.
   *
   * @param {string} aString
   *   String to test.
   * @param {RegEx} aRegex
   *   Regular expression to use for testing that a match does not exist.
   * @param {string} aMessage
   *   Message to show for the test result
   * @returns {boolean} Result of the test.
   */
Test if the regular expression does not match the string.
@param {string} aString
String to test.
@param {RegEx} aRegex
Regular expression to use for testing that a match does not exist.
@param {string} aMessage
Message to show for the test result
@returns {boolean} Result of the test.
Test if the regular expression does not match the string . @param { string } aString String to test . @param { RegEx } aRegex Regular expression to use for testing that a match does not exist . @param { string } aMessage Message to show for the test result @returns { boolean } Result of the test .
function Expect_notMatch(aString, aRegex, aMessage) {
    let pattern = flags = "";
    try {
      let matches = aRegex.toString().match(/\/(.*)\/(.*)/);
      pattern = matches[1];
      flags = matches[2];
    }
    catch (ex) {
    }
    let regex = new RegExp(pattern, flags);
    let condition = (aString.match(regex) === null);
    let diagnosis = "'" + regex + "' doesn't match for '" + aString + "'";
    return this._test(condition, aMessage, diagnosis);
  }
function Expect_notMatch ( aString , aRegex , aMessage ) { let pattern = flags = "" ; try { let matches = aRegex . toString ( ) . match ( / \/(.*)\/(.*) / ) ; pattern = matches [ 1 ] ; flags = matches [ 2 ] ; } catch ( ex ) { } let regex = new RegExp ( pattern , flags ) ; let condition = ( aString . match ( regex ) === null ) ; let diagnosis = "'" + regex + "' doesn't match for '" + aString + "'" ; return this . _test ( condition , aMessage , diagnosis ) ; }
Test if the regular expression does not match the string.
Test if the regular expression does not match the string .
// XXX Bug 634948 // Regex objects are transformed to strings when evaluated in a sandbox // For now lets re-create the regex from its string representation