
    @6i	X                         d dl Z d dlZ G d de j                        Z G d de j                        Zedk(  r e j                          yy)    Nc                      e Zd Zd Zd Zd Zd Zd Zd Zd Z	d Z
d	 Zd
 Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Z d Z!d  Z"d! Z#d" Z$d# Z%d$ Z&d% Z'd& Z(d' Z)d( Z*d) Z+d* Z,d+ Z-d, Z.d- Z/d. Z0d/ Z1d0 Z2d1 Z3d2 Z4d3 Z5d4 Z6d5 Z7d6 Z8d7 Z9d8 Z:d9 Z;d: Z<d; Z=d< Z>d= Z?d> Z@d? ZAd@ ZBdA ZCdB ZDdC ZEdD ZFdE ZGdF ZHdG ZIdH ZJyI)JJsTestsc                 ,    t        j                   |      S )Njsminselfjss     M/home/azureuser/techstart-app/venv/lib/python3.12/site-packages/jsmin/test.py_minifyzJsTests._minify!   s    {{2    c                 V    ||k7  r$t        t        |      t        |             t        y)NT)printreprAssertionError)r	   thing1thing2s      r   assertEqualzJsTests.assertEqual$   s%    V$v,V-  r   c                 T    t        j                   |fi |}||k(  sJ d|d|       y )N
got: 
exp: r   )r	   js_inputexpectedkwargsminifieds        r   assertMinifiedzJsTests.assertMinified*   s-    ;;x2628#PXx%PP#r   c                 0    d}d}| j                  ||       y )Na\  
        Object.extend(String, {
          interpret: function(value) {
            return value == null ? '' : String(value);
          },
          specialChar: {
            '\b': '\\b',
            '\t': '\\t',
            '\n': '\\n',
            '\f': '\\f',
            '\r': '\\r',
            '\\': '\\\\'
          }
        });

        zObject.extend(String,{interpret:function(value){return value==null?'':String(value);},specialChar:{'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','\\':'\\\\'}});r   r	   r
   r   s      r   
testQuotedzJsTests.testQuoted.   s!      DB)r   c                 0    d}d}| j                  ||       y )Na  // use native browser JS 1.6 implementation if available
        if (Object.isFunction(Array.prototype.forEach))
          Array.prototype._each = Array.prototype.forEach;

        if (!Array.prototype.indexOf) Array.prototype.indexOf = function(item, i) {

        // hey there
        function() {// testing comment
        foo;
        //something something

        location = 'http://foo.com;';   // goodbye
        }
        //bye
        zif(Object.isFunction(Array.prototype.forEach))
Array.prototype._each=Array.prototype.forEach;if(!Array.prototype.indexOf)Array.prototype.indexOf=function(item,i){function(){foo;location='http://foo.com;';}r   r   s      r   testSingleCommentzJsTests.testSingleCommentB   s!    bB)r   c                     | j                  dd       | j                  dd       | j                  dd       | j                  dd       | j                  dd       y )N  
z
	r   r	   s    r   	testEmptyzJsTests.testEmptyV   sR    B#C$D"%FB'D"%r   c                 0    d}d}| j                  ||       y )Na.  
        function foo() {
            print('hey');
        }
        /*
        if(this.options.zindex) {
          this.originalZ = parseInt(Element.getStyle(this.element,'z-index') || 0);
          this.element.style.zIndex = this.options.zindex;
        }
        */
        another thing;
        z,function foo(){print('hey');}
another thing;r   r   s      r   testMultiCommentzJsTests.testMultiComment^   s     B)r   c                 0    d}d}| j                  ||       y )Nz/* here is a comment at the top
        
        it ends here */
        function foo() {
            alert('crud');
        }
        
        zfunction foo(){alert('crud');}r   r   s      r   testLeadingCommentzJsTests.testLeadingCommento   s      9B)r   c                 (    | j                  dd       y )NzA; /*/ comment */ BA;Br   r(   s    r   !testBlockCommentStartingWithSlashz)JsTests.testBlockCommentStartingWithSlash{       159r   c                 (    | j                  dd       y )NzA; /* comment /*/ Br/   r   r(   s    r   testBlockCommentEndingWithSlashz'JsTests.testBlockCommentEndingWithSlash~   r1   r   c                 (    | j                  dd       y )Nz/*/ comment */ AAr   r(   s    r   (testLeadingBlockCommentStartingWithSlashz0JsTests.testLeadingBlockCommentStartingWithSlash       .4r   c                 (    | j                  dd       y )Nz/* comment /*/ Ar5   r   r(   s    r   &testLeadingBlockCommentEndingWithSlashz.JsTests.testLeadingBlockCommentEndingWithSlash   r7   r   c                 (    | j                  dd       y )Nz/**/ Ar5   r   r(   s    r   testEmptyBlockCommentzJsTests.testEmptyBlockComment   s    Hc*r   c                 (    | j                  dd       y )Nz/* A /* B */ CCr   r(   s    r   testBlockCommentMultipleOpenz$JsTests.testBlockCommentMultipleOpen   s    ,c2r   c                 (    | j                  dd       y )Nz     // a commentr$   r   r(   s    r   testJustACommentzJsTests.testJustAComment   s    /4r   c                 0    d}d}| j                  ||       y )Nz\
        files = [{name: value.replace(/^.*\\/, '')}];
        // comment
        A
        z*files=[{name:value.replace(/^.*\\/,'')}];Ar   r   s      r   test_issue_bitbucket_10zJsTests.test_issue_bitbucket_10   s!    
 FB)r   c                 0    d}d}| j                  ||       y )Nz[
        files = [{name: value.replace(/^.*\\/, '')}]
        // comment
        A
        z*files=[{name:value.replace(/^.*\\/,'')}]
Ar   r   s      r   )test_issue_bitbucket_10_without_semicolonz1JsTests.test_issue_bitbucket_10_without_semicolon   s!    
 GB)r   c                 0    d}d}| j                  ||       y )Nz  
        var str = this.replace(/\\./g, '@').replace(/"[^"\\\n\r]*"/g, '');
        return (/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(str);
        });zzvar str=this.replace(/\\./g,'@').replace(/"[^"\\\n\r]*"/g,'');return(/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(str);});r   r   s      r   testRezJsTests.testRe   s!     UB)r   c                 0    d}d}| j                  ||       y )Na0  
        var options_for_droppable = {
          overlap:     options.overlap,
          containment: options.containment,
          tree:        options.tree,
          hoverclass:  options.hoverclass,
          onHover:     Sortable.onHover
        }

        var options_for_tree = {
          onHover:      Sortable.onEmptyHover,
          overlap:      options.overlap,
          containment:  options.containment,
          hoverclass:   options.hoverclass
        }

        // fix for gecko engine   
        Element.cleanWhitespace(element); 
        aI  var options_for_droppable={overlap:options.overlap,containment:options.containment,tree:options.tree,hoverclass:options.hoverclass,onHover:Sortable.onHover}
var options_for_tree={onHover:Sortable.onEmptyHover,overlap:options.overlap,containment:options.containment,hoverclass:options.hoverclass}
Element.cleanWhitespace(element);r   r   s      r   testIgnoreCommentzJsTests.testIgnoreComment   s"    &% 	B)r   c                 0    d}d}| j                  ||       y )Na  
        inspect: function(useDoubleQuotes) {
          var escapedString = this.gsub(/[\x00-\x1f\\]/, function(match) {
            var character = String.specialChar[match[0]];
            return character ? character : '\\u00' + match[0].charCodeAt().toPaddedString(2, 16);
          });
          if (useDoubleQuotes) return '"' + escapedString.replace(/"/g, '\\"') + '"';
          return "'" + escapedString.replace(/'/g, '\\\'') + "'";
        },

        toJSON: function() {
          return this.inspect(true);
        },

        unfilterJSON: function(filter) {
          return this.sub(filter || Prototype.JSONFilter, '#{1}');
        },
        a  inspect:function(useDoubleQuotes){var escapedString=this.gsub(/[\x00-\x1f\\]/,function(match){var character=String.specialChar[match[0]];return character?character:'\\u00'+match[0].charCodeAt().toPaddedString(2,16);});if(useDoubleQuotes)return'"'+escapedString.replace(/"/g,'\\"')+'"';return"'"+escapedString.replace(/'/g,'\\\'')+"'";},toJSON:function(){return this.inspect(true);},unfilterJSON:function(filter){return this.sub(filter||Prototype.JSONFilter,'#{1}');},r   r   s      r   testHairyRezJsTests.testHairyRe   s!    $ nB)r   c                 \    d}d}| j                  ||       d}d}| j                  ||       y )NzJ
        myString.replace(/\\/g, '/');
        console.log("hi");
        z.myString.replace(/\\/g,'/');console.log("hi");zn return /^data:image\//i.test(url) || 
        /^(https?|ftp|file|about|chrome|resource):/.test(url);
        zYreturn /^data:image\//i.test(url)||/^(https?|ftp|file|about|chrome|resource):/.test(url);r   r   s      r   testLiteralRezJsTests.testLiteralRe   s@     IB) tB)r   c                 X    d}d}| j                  ||       d}| j                  ||       y )Na  
        onSuccess: function(transport) {
            var js = transport.responseText.strip();
            if (!/^\[.*\]$/.test(js)) // TODO: improve sanity check
              throw 'Server returned an invalid collection representation.';
            this._collection = eval(js);
            this.checkForExternalText();
          }.bind(this),
          onFailure: this.onFailure
        });
        zonSuccess:function(transport){var js=transport.responseText.strip();if(!/^\[.*\]$/.test(js))
throw'Server returned an invalid collection representation.';this._collection=eval(js);this.checkForExternalText();}.bind(this),onFailure:this.onFailure});at  
        onSuccess: function(transport) {
            var js = transport.responseText.strip();
            if (!/^\[.*\]$/.test(js))
              throw 'Server returned an invalid collection representation.';
            this._collection = eval(js);
            this.checkForExternalText();
          }.bind(this),
          onFailure: this.onFailure
        });
        r   )r	   r
   r   js_without_comments       r   testNoBracesWithCommentzJsTests.testNoBracesWithComment   s<    
_B)
 	.9r   c                 ,    d}| j                  |d       y )Nz-
        num = num.replace(/ /g,'');
        znum=num.replace(/ /g,'');r   r   s     r   testSpaceInRezJsTests.testSpaceInRe  s     	B ;<r   c                 ,    d}| j                  |d       y )Nz7
        function foo('') {
        
        }
        function foo(''){}r   r   s     r   testEmptyStringzJsTests.testEmptyString	  s    
 	B 45r   c                 ,    d}| j                  |d       y )Nz
var  foo    =  "hey";
        zvar foo="hey";r   r   s     r   testDoubleSpacezJsTests.testDoubleSpace  s     	B 01r   c                 H    d}| j                  ||j                                y )Nz/[d]+/g    )r   stripr   s     r   testLeadingRegexzJsTests.testLeadingRegex  s    B
+r   c                 ,    d}| j                  |d       y )Nz5'a string in the middle of nowhere'; // and a commentz$'a string in the middle of nowhere';r   r   s     r   testLeadingStringzJsTests.testLeadingString  s    EB FGr   c                 ,    d}| j                  |d       y )Nz// a comment\nr$   r   r   s     r   testSingleCommentEndzJsTests.testSingleCommentEnd  s    B#r   c                     	 ddl m }  |d      } |       }t        j                         }|j                  ||       |j                         }|dk(  sJ y # t        $ r	 ddlm } Y ^w xY w)Nr   )StringIOz;
            function foo('') {

            }
            rS   )r_   ImportErrorior   JavascriptMinifyminifygetvalue)r	   r_   insoutsmoutputs         r   testInputStreamzJsTests.testInputStream#  sn    	$)   
 z""$	d----  	$#	$s   A A'&A'c                 Z    d}d}t        j                   |      }| j                  ||       y )Nu	   䀀 //foou   䀀)r   r   )r	   instrr   rh   s       r   testUnicodezJsTests.testUnicode4  s*    U#*r   c                 (    | j                  dd       y )Nz//test
r$   r   r(   s    r   testCommentBeforeEOFzJsTests.testCommentBeforeEOF:  s    L"-r   c                 (    | j                  dd       y )Nz+{ 
            a: 1,//comment
            }z{a:1,}r   r(   s    r   testCommentInObjzJsTests.testCommentInObj=  s     	r   c                 (    | j                  dd       y )Nz{a: 1//comment
}z{a:1}r   r(   s    r   testCommentInObj2zJsTests.testCommentInObj2B  s    17;r   c                 (    | j                  dd       y )Nreturn
ar   r(   s    r   testImplicitSemicolonzJsTests.testImplicitSemicolonE  s     	K5r   c                 (    | j                  dd       y )Nzreturn;//comment
azreturn;ar   r(   s    r   test_explicit_semicolonzJsTests.test_explicit_semicolonJ  s    3Z@r   c                 (    | j                  dd       y )Nzreturn//comment...
arz	return
arr   r(   s    r   testImplicitSemicolon2zJsTests.testImplicitSemicolon2M  s    6Er   c                 (    | j                  dd       y )Nzreturn//comment...
art   r   r(   s    r   testImplicitSemicolon3zJsTests.testImplicitSemicolon3P  s    5{Cr   c                 (    | j                  dd       y )Nz*x.replace(/\//, "_")// slash to underscorezx.replace(/\//,"_")r   r(   s    r   testSingleComment2zJsTests.testSingleComment2S  s    H%	'r   c                 0    d}d}| j                  ||       y )Nz2
        { a: n / 2, }
        // comment
        z{a:n/2,}r   r	   originalr   s      r   testSlashesNearCommentszJsTests.testSlashesNearCommentsW  s      "Hh/r   c                 \    d}d}| j                  ||       d}d}| j                  ||       y )Nz1
        return foo;//comment
        return bar;zreturn foo;return bar;z'
        return foo
        return bar;zreturn foo
return bar;r   r   s      r   
testReturnzJsTests.testReturn_  s>     ,Hh/ -Hh/r   c                 0    d}d}| j                  ||       y )Nz"s" + ++e + "s"z"s"+ ++e+"s"r   r   s      r   test_space_pluszJsTests.test_space_plusk  s    $!Hh/r   c                 0    d}d}| j                  ||       y )Nz"s"r   r   s      r   test_no_final_newlinezJsTests.test_no_final_newlinep  s    Hh/r   c                 ,    d}| j                  ||       y )Nz%/(NaN| {2}|^$)/.test(a)&&(a="M 0 0");r   r	   r   s     r   test_space_with_regex_repeatsz%JsTests.test_space_with_regex_repeatsu  s    :Hh/r   c                 ,    d}| j                  ||       y )Nz)aaa;/(NaN| {2}|^$)/.test(a)&&(a="M 0 0");r   r   s     r   *test_space_with_regex_repeats_not_at_startz2JsTests.test_space_with_regex_repeats_not_at_starty  s    >Hh/r   c                 ,    d}| j                  ||       y )Nz/a (a)/.test("a")r   r   s     r   test_space_in_regexzJsTests.test_space_in_regex}  s    &Hh/r   c                 0    d}d}| j                  ||       y )Nzfunction a() { /\//.test("a") }zfunction a(){/\//.test("a")}r   r   s      r   "test_brackets_around_slashed_regexz*JsTests.test_brackets_around_slashed_regex  s    41Hh/r   c                 X    d}t        j                   |      }| j                  d|v        y )Nzvar /** holds major version number for IE or NaN for real browsers */
                      msie,
                      jqLite,           // delay binding since jQuery could be loaded after us.zvar
msie)r   
assertTrue)r	   r   r   s      r   test_angular_1zJsTests.test_angular_1  s+    c ;;x(x/0r   c                 0    d}d}| j                  ||       y )Nzvar/* comment */msie;	var msie;r   r   s      r   test_angular_2zJsTests.test_angular_2  s    *Hh/r   c                 0    d}d}| j                  ||       y )Nzvar /* comment */msie;r   r   r   s      r   test_angular_3zJsTests.test_angular_3  s    +Hh/r   c                 0    d}d}| j                  ||       y )Nzvar /* comment */ msie;r   r   r   s      r   test_angular_4zJsTests.test_angular_4  s    ,Hh/r   c                 ,    d}| j                  ||       y )Nza/br   r   s     r   test_angular_5zJsTests.test_angular_5  s    Hh/r   c                     d}| j                  ||d       d}| j                  ||d       d}| j                  ||d       d}| j                  ||d       d}d}| j                  ||d       y )	Nz`test`'"`quote_charsz` test with leading whitespace`z `test with trailing whitespace `z`test
with a new line`ad  dumpAvStats: function(stats) {
        var statsString = "";
        if (stats.mozAvSyncDelay) {
          statsString += `A/V sync: ${stats.mozAvSyncDelay} ms `;
        }
        if (stats.mozJitterBufferDelay) {
          statsString += `Jitter-buffer delay: ${stats.mozJitterBufferDelay} ms`;
        }

        return React.DOM.div(null, statsString);a  dumpAvStats:function(stats){var statsString="";if(stats.mozAvSyncDelay){statsString+=`A/V sync: ${stats.mozAvSyncDelay} ms `;}
if(stats.mozJitterBufferDelay){statsString+=`Jitter-buffer delay: ${stats.mozJitterBufferDelay} ms`;}
return React.DOM.div(null,statsString);r   r   s      r   testBacktickszJsTests.testBackticks  s    HhFC4HhFC5HhFCHhFC	4 dHhFCr   c                 \    d}| j                  ||d       d}| j                  ||d       y )Nz+`Fifteen is ${a + b} and not ${2 * a + b}.`r   r   z-`Fifteen is ${a +
b} and not ${2 * a + "b"}.`r   r   s     r   testBackticksExpressionsz JsTests.testBackticksExpressions  s8    @HhFCHhFCr   c                 0    d}| j                  ||d       y )Nz&tag`Hello ${ a + b } world ${ a * b}`;r   r   r   r   s     r   testBackticksTaggedzJsTests.testBackticksTagged  s    ;HhFCr   c                 ,    d}| j                  |d       y )Nzr
            f = function() {
                return /DataTree\/(.*)\//.exec(this._url)[1];
            }
        z;f=function(){return /DataTree\/(.*)\//.exec(this._url)[1];}r   r   s     r   test_issue_bitbucket_16zJsTests.test_issue_bitbucket_16  s     
 	I	Kr   c                 ,    d}| j                  |d       y )Nz+// hi
/^(get|post|head|put)$/i.test('POST')z%/^(get|post|head|put)$/i.test('POST')r   r   s     r   test_issue_bitbucket_17zJsTests.test_issue_bitbucket_17  s    AHC	Er   c                 p    d}|j                  dd      j                  dd      }| j                  ||       y )Nz
            respond.regex = {
                comments: /\/\*[^*]*\*+([^/][^*]*\*+)*\//gi,
                urls: 'whatever'
            };
        r%   r$   r&   )replacer   r   s      r   test_issue_6zJsTests.test_issue_6  s:     ##C,44T2>Hh/r   c                     dj                  g d      }dj                  g d      }| j                  ||       | j                  ||       y )Nr&   )z!var a = 'hi' // this is a commentz*var a = 'hi' /* this is also a  comment */z#console.log(1) // this is a commentz+console.log(1) /* this is also a comment */z1 // this is a commentz1 /* this is also a comment */z{} // this is a commentz{} /* this is also a comment */z"YOLO" /* this is a comment */z"YOLO" // this is a commentz(1 + 2) // commentz(1 + 2) /* yup still comment */var b)
var a='hi'r   console.log(1)r   1r   {}r   "YOLO"r   (1+2)r   r   )joinr   r   s      r   test_issue_9zJsTests.test_issue_9  sL    99 
  99 
  	Hh/Hh/r   c                 (    | j                  dd       y )Nz"yolo"
"loyo"r   r(   s    r   test_newline_between_stringsz$JsTests.test_newline_between_strings  s    ,.>?r   c                 (    | j                  dd       y )Nzvar/* comment */azvar ar   r(   s    r   %test_issue_10_comments_between_tokensz-JsTests.test_issue_10_comments_between_tokens  s    /9r   c                 (    | j                  dd       y )Nzvar s = "s"z	var s="s"r   r(   s    r   test_ends_with_stringzJsTests.test_ends_with_string  s    M;7r   c                 (    | j                  dd       y )Nza;/**/ba;br   r(   s    r   test_short_commentzJsTests.test_short_comment  s    Iu-r   c                 (    | j                  dd       y )Nza;/*/*/br   r   r(   s    r   test_shorter_commentzJsTests.test_shorter_comment  s    J.r   c                 (    | j                  dd       y )Nza;/**/
br   r   r(   s    r   !test_block_comment_with_semicolonz)JsTests.test_block_comment_with_semicolon  s    K/r   c                 (    | j                  dd       y )Nza/**/
var bza
var br   r(   s    r   *test_block_comment_With_implicit_semicolonz2JsTests.test_block_comment_With_implicit_semicolon  s    NJ7r   c                 ,    d}| j                  |d       y )Nz_
            var a = "hello" // this is a comment
                       a += " world"
        var a="hello"
a+=" world"r   r   s     r   test_issue_9_single_commentsz$JsTests.test_issue_9_single_comments       	H&BCr   c                 ,    d}| j                  |d       y )Nzb
            var a = "hello" /* this is a comment */
                       a += " world"
        r   r   r   s     r   test_issue_9_multi_commentsz#JsTests.test_issue_9_multi_comments  r   r   c                 ,    d}| j                  |d       y )NzD
            var re = /\d{4}/
            if (1) { console.log(2); }z%var re=/\d{4}/
if(1){console.log(2);}r   r   s     r   test_issue_12_re_nl_ifzJsTests.test_issue_12_re_nl_if%  s     * 	>	@r   c                 ,    d}| j                  |d       y )Nz0
            var re = /\d{4}/
            g = 10zvar re=/\d{4}/
g=10r   r   s     r   test_issue_12_re_nl_otherz!JsTests.test_issue_12_re_nl_other,  s     	H'=>r   c                 0    d}d}| j                  ||       y )Na  
            function this() {
                /*! Copyright year person */
                console.log('hello!');
            }

            /*! Copyright blah blah
             *
             *  Some other text
             */

            var a;
        zfunction this(){/*! Copyright year person */
console.log('hello!');}/*! Copyright blah blah
             *
             *  Some other text
             */

var a;r   r   s      r   test_preserve_copyrightzJsTests.test_preserve_copyright2  s"    
 	Hh/r   c                 ,    d}| j                  |d       y )Nzreturn x / 1;zreturn x/1;r   r   s     r   test_issue_14zJsTests.test_issue_14G      "Hm4r   c                 ,    d}| j                  |d       y )Nzreturn r / 1;zreturn r/1;r   r   s     r   #test_issue_14_with_char_from_returnz+JsTests.test_issue_14_with_char_from_returnK  r   r   N)K__name__
__module____qualname__r   r   r   r    r"   r)   r+   r-   r0   r3   r6   r9   r;   r>   r@   rB   rD   rF   rH   rJ   rL   rO   rQ   rT   rV   rY   r[   r]   ri   rl   rn   rp   rr   ru   rw   ry   r{   r}   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r    r   r   r   r       sy   Q*(*(&*"
*::55+35****2*,*:8=62,H$."+.
<6
AFD'0
00
0
0000
10
0
0
0D6DDKE
0 0D@:8./08DD@?0*55r   r   c                   B    e Zd Zd Zd Zd Zd Zd Zd Zd Z	d Z
d	 Zy
)
RegexTestsc                     t         j                  j                  } ||dd        } |       }t        j                  ||      j	                  |d   |d          |j                         S )N   r      )r   ra   r_   rb   regex_literalrd   )r	   r
   klassre   rf   s        r   regex_recognisezRegexTests.regex_recogniseR  sX    !!BqrFmwsD)771r!uE}}r   c                 d    |d   dk(  sJ | j                  |      }||k(  sJ d|d|d|       y )Nr   /z
 in: r   r   )r   )r	   r   r   
recogniseds       r   assert_regexzRegexTests.assert_regexY  s@    {c!!!))(3
X%gR\^f'gg%r   c                 (    | j                  dd       y )Nz/123/gz/123/r   r(   s    r   test_simplezRegexTests.test_simple^  s    (G,r   c                 (    | j                  dd       y )Nz
/a[0-9]b/gz	/a[0-9]b/r   r(   s    r   test_character_classzRegexTests.test_character_classa  s    ,4r   c                 (    | j                  dd       y )Nz/a[/]b/gz/a[/]b/r   r(   s    r   test_character_class_with_slashz*RegexTests.test_character_class_with_slashd      *i0r   c                 (    | j                  dd       y )Nz/a\/b/gz/a\/b/r   r(   s    r   test_escaped_forward_slashz%RegexTests.test_escaped_forward_slashg  r   r   c                 (    | j                  dd       y )Nz/a\\/gz/a\\/r   r(   s    r   test_escaped_back_slashz"RegexTests.test_escaped_back_slashj  s    )X.r   c                 (    | j                  dd       y )Nz	/a[]/]b/gz/a[]/]b/r   r(   s    r   test_empty_character_classz%RegexTests.test_empty_character_classm  s    
 	+z2r   c                 L    | j                  dd       | j                  dd       y )Nz
/a([)])b/gz	/a([)])b/z/a[(]b/gz/a[(]b/r   r(   s    r   test_precedence_of_parensz$RegexTests.test_precedence_of_parenst  s$     	,4*i0r   N)r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   P  s0    h
-511/31r   r   __main__)unittestr   TestCaser   r   r   mainr   r   r   <module>r      sO   8  m5h m5`)1"" )1V zHMMO r   