aboutsummaryrefslogblamecommitdiffstats
path: root/tests/test-match-pattern.js
blob: 106937a109e109a33b59e7a966ba6733d3b1d7e6 (plain) (tree)
1
2
3
4
5
6
                                                         
 


                                                    
                                      







                                                                                            
  
var MatchPattern = require("match-pattern").MatchPattern;

exports.ensureMatchPattern = function(test) {
  var pattern = new MatchPattern(
      "https://bugzilla.redhat.com/attachment.cgi");
  console.log("pattern = " + pattern);
  test.assert(pattern
      .test("https://bugzilla.redhat.com/attachment.cgi"),
      "testing match pattern");
  test
      .assert(
          !pattern
              .test("https://bugzilla.redhat.com/attachment.cgi?bugid=676538&action=enter"),
          "testing failing match pattern");
};