<commit_before><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html lang="ko" xml:lang="ko" xmlns="http://www.w3.org/1999/xhtml"> 
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<title>Autolink Addon Unit Test</title>
<link rel="stylesheet" type="text/css" href="../../common/js/unittest/css/JSSpec.css" />
<script type="text/javascript" src="../../common/js/jquery.js"></script>
<script type="text/javascript" src="../../common/js/common.js"></script>
<script type="text/javascript" src="../../common/js/js_app.js"></script>
<script type="text/javascript" src="autolink.js"></script>
<script type="text/javascript" src="../../common/js/unittest/JSSpec/diff_match_patch.js"></script>
<script type="text/javascript" src="../../common/js/unittest/JSSpec/JSSpec.js"></script>
<script type="text/javascript">// <![CDATA[

var testParam = null;
var TestSuite = xe.createPlugin("TestSuite", {
	API_BEFORE_AUTOLINK : function(oSender, params) {
		return !jQuery(params[0]).parent().is('#test7');
	},
	API_AFTER_AUTOLINK : function(oSender, params) {
		testParam = params[0];
	}
});

xe.registerPlugin(new TestSuite);

jQuery(function($){
	
describe('AutoLink functionality', {
	"#test1 - plain text don't have any link text" : function() {
		value_of( $('#test1').children().length ).should_be(0);
	},
	"#test2 - simple link text only" : function() {
		value_of( $('#test2 > a').length > 0 ).should_be_true();
		value_of( $('#test2 > a').attr('href') ).should_be($('#test2 > a').text());
		value_of( $('#test2').children().length ).should_be(1);
	},
	"#test3 - simple link text and some text" : function() {
		value_of( $('#test3 > a').length > 0 ).should_be_true();
		value_of( $('#test3 > a').attr('href') ).should_be($('#test3 > a').text());
		value_of( $('#test3').contents().length ).should_be(2);
	},
	"#test4 - complex link text only" : function() {
		value_of( $('#test4 > a').length > 0 ).should_be_true();
		value_of( $('#test4 > a').attr('href') ).should_be($('#test4 > a').text());
		value_of( $('#test4').children().length ).should_be(1);
	},
	"#test5 - complex link text and some text" : function() {
		value_of( $('#test5 > a').length > 0 ).should_be_true();
		value_of( $('#test5 > a').attr('href') ).should_be($('#test5 > a').text());
		value_of( $('#test5').contents().length ).should_be(3);
	},
	"#test6 - complex example" : function() {
		value_of( $('#test6 a').length ).should_be(4);
		value_of( $('#test6 a').eq(0).attr('href') ).should_be($('#test6 a').eq(0).text());
		value_of( $('#test6 a').eq(2).parent().is('b') ).should_be_true();
		value_of( $('#test6 > textarea > a').length ).should_be(0);
		value_of( $('#test6 > div > a').attr("target") ).should_be("_self");
	}
});


describe('Autolink trigger', {
	"#test7 - ignored" : function() {
		value_of( $('#test7 > a').length ).should_be(0);
	},
	"#test8 - parameter on after trigger" : function() {
		value_of( $(testParam).is('a') ).should_be_true();
	}
});


});
// ]]></script>
</head>
<body>
<div class="xe_content" style="display:none">
	<div id="test1">This is autolink test. This text don't have any link text.</div>
	<div id="test2">http://mygony.com</div>
	<div id="test3">Go to http://mygony.com</div>
	<div id="test4">http://www.abc.com/some_program?hello=world&encoded=%ED%C2%C1</div>
	<div id="test5">Before text. http://www.abc.com/some_program?hello=world&encoded=%ED%C2%C1 After Text</div>
	<div id="test6">
		This is text. http://www.abc.com/some_program?hello=world&encoded=%ED%C2%C1 Text Text.
		Another URL : http://www.decccccf12312.co.uk/path/to/program?mymy=lovelove. XE!
		<b>Bold text and http://mail.abc.com/path/to/one_cgi.cgi?hello=world#hash_text Bold text end</b>
		<textarea>this text should be ignored http://mygony.com ignored?</textarea>
		<div>
			Hello~
			<a href="http://mygony.com" target="_self">http://mygony.com</a>
			Sayonara~
		</div>
	</div>
	<div id="test7">http://mygony.com</div>
	<div id="test8">Go to http://mygony.com</div>
</div>
</body>
</html><commit_msg>autolink : 괄호를 포함하지 않는 테스트 케이스 추가<commit_after><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html lang="ko" xml:lang="ko" xmlns="http://www.w3.org/1999/xhtml"> 
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<title>Autolink Addon Unit Test</title>
<link rel="stylesheet" type="text/css" href="../../common/js/unittest/css/JSSpec.css" />
<script type="text/javascript" src="../../common/js/jquery.js"></script>
<script type="text/javascript" src="../../common/js/common.js"></script>
<script type="text/javascript" src="../../common/js/js_app.js"></script>
<script type="text/javascript" src="autolink.js"></script>
<script type="text/javascript" src="../../common/js/unittest/JSSpec/diff_match_patch.js"></script>
<script type="text/javascript" src="../../common/js/unittest/JSSpec/JSSpec.js"></script>
<script type="text/javascript">// <![CDATA[

var testParam = null;
var TestSuite = xe.createPlugin("TestSuite", {
	API_BEFORE_AUTOLINK : function(oSender, params) {
		return !jQuery(params[0]).parent().is('#test7');
	},
	API_AFTER_AUTOLINK : function(oSender, params) {
		testParam = params[0];
	}
});

xe.registerPlugin(new TestSuite);

jQuery(function($){
	
describe('AutoLink functionality', {
	"#test1 - plain text don't have any link text" : function() {
		value_of( $('#test1').children().length ).should_be(0);
	},
	"#test2 - simple link text only" : function() {
		value_of( $('#test2 > a').length > 0 ).should_be_true();
		value_of( $('#test2 > a').attr('href') ).should_be($('#test2 > a').text());
		value_of( $('#test2').children().length ).should_be(1);
	},
	"#test3 - simple link text and some text" : function() {
		value_of( $('#test3 > a').length > 0 ).should_be_true();
		value_of( $('#test3 > a').attr('href') ).should_be($('#test3 > a').text());
		value_of( $('#test3').contents().length ).should_be(2);
	},
	"#test4 - complex link text only" : function() {
		value_of( $('#test4 > a').length > 0 ).should_be_true();
		value_of( $('#test4 > a').attr('href') ).should_be($('#test4 > a').text());
		value_of( $('#test4').children().length ).should_be(1);
	},
	"#test5 - complex link text and some text" : function() {
		value_of( $('#test5 > a').length > 0 ).should_be_true();
		value_of( $('#test5 > a').attr('href') ).should_be($('#test5 > a').text());
		value_of( $('#test5').contents().length ).should_be(3);
	},
	"#test6 - complex example" : function() {
		value_of( $('#test6 a').length ).should_be(4);
		value_of( $('#test6 a').eq(0).attr('href') ).should_be($('#test6 a').eq(0).text());
		value_of( $('#test6 a').eq(2).parent().is('b') ).should_be_true();
		value_of( $('#test6 > textarea > a').length ).should_be(0);
		value_of( $('#test6 > div > a').attr("target") ).should_be("_self");
	},
	"#test9 - don't include parenthesis" : function() {
		value_of( $('#test9 a').length ).should_be(1);
		value_of( $('#test9 a').attr('href') ).should_be('http://www.naver.com');
	}
});


describe('Autolink trigger', {
	"#test7 - ignored" : function() {
		value_of( $('#test7 > a').length ).should_be(0);
	},
	"#test8 - parameter on after trigger" : function() {
		value_of( $(testParam).is('a') ).should_be_true();
	}
});


});
// ]]></script>
</head>
<body>
<div class="xe_content" style="display:none">
	<div id="test1">This is autolink test. This text don't have any link text.</div>
	<div id="test2">http://mygony.com</div>
	<div id="test3">Go to http://mygony.com</div>
	<div id="test4">http://www.abc.com/some_program?hello=world&encoded=%ED%C2%C1</div>
	<div id="test5">Before text. http://www.abc.com/some_program?hello=world&encoded=%ED%C2%C1 After Text</div>
	<div id="test6">
		This is text. http://www.abc.com/some_program?hello=world&encoded=%ED%C2%C1 Text Text.
		Another URL : http://www.decccccf12312.co.uk/path/to/program?mymy=lovelove. XE!
		<b>Bold text and http://mail.abc.com/path/to/one_cgi.cgi?hello=world#hash_text Bold text end</b>
		<textarea>this text should be ignored http://mygony.com ignored?</textarea>
		<div>
			Hello~
			<a href="http://mygony.com" target="_self">http://mygony.com</a>
			Sayonara~
		</div>
	</div>
	<div id="test7">http://mygony.com</div>
	<div id="test8">Go to http://mygony.com</div>
	<div id="test9">Naver(http://www.naver.com)</div>
</div>
</body>
</html>
{'fraction_non_alphanumeric': 0.24160436691586568, 'fraction_numerical': 0.019817254064317075, 'mean_word_length': 4.772602739726027, 'pattern_counts': {'":': 0, '<': 109, '<?xml version=': 0, '>': 151, 'https://': 0, 'lorem ipsum': 0, 'www.': 14, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4991587', 'n_tokens_mistral': 3286, 'n_tokens_neox': 3144, 'n_words': 576}