<commit_before>/*
 * mobile page unit tests
 */
(function($){
	module('jquery.mobile.page.js');

	test( "nested header anchors aren't altered", function(){
		ok(!$('.ui-header > div > a').hasClass('ui-btn'));
	});

	test( "nested footer anchors aren't altered", function(){
		ok(!$('.ui-footer > div > a').hasClass('ui-btn'));
	});

	test( "nested bar anchors aren't styled", function(){
		ok(!$('.ui-bar > div > a').hasClass('ui-btn'));
	});

	test( "unnested footer anchors are styled", function(){
		ok($('.ui-footer > a').hasClass('ui-btn'));
	});

	test( "unnested footer anchors are styled", function(){
		ok($('.ui-footer > a').hasClass('ui-btn'));
	});

	test( "unnested bar anchors are styled", function(){
		ok($('.ui-bar > a').hasClass('ui-btn'));
	});

	test( "no auto-generated back button exists on first page", function(){
		ok( !$('.ui-header > [data-rel="back"]').length );
	});
})(jQuery);<commit_msg>added type attribute regex tests for the different ways that browsers serialize html<commit_after>/*
 * mobile page unit tests
 */
(function($){
	var libName = 'jquery.mobile.page.js',
			typeAttributeRegex = $.mobile.page.prototype._typeAttributeRegex;

	module(libName);

	test( "nested header anchors aren't altered", function(){
		ok(!$('.ui-header > div > a').hasClass('ui-btn'));
	});

	test( "nested footer anchors aren't altered", function(){
		ok(!$('.ui-footer > div > a').hasClass('ui-btn'));
	});

	test( "nested bar anchors aren't styled", function(){
		ok(!$('.ui-bar > div > a').hasClass('ui-btn'));
	});

	test( "unnested footer anchors are styled", function(){
		ok($('.ui-footer > a').hasClass('ui-btn'));
	});

	test( "unnested footer anchors are styled", function(){
		ok($('.ui-footer > a').hasClass('ui-btn'));
	});

	test( "unnested bar anchors are styled", function(){
		ok($('.ui-bar > a').hasClass('ui-btn'));
	});

	test( "no auto-generated back button exists on first page", function(){
		ok( !$('.ui-header > [data-rel="back"]').length );
	});

	test( "input type replacement regex works properly", function(){
		ok(typeAttributeRegex.test( "<input type=range" ), "test no quotes" );
		ok(typeAttributeRegex.test( "<input type='range'" ), "test single quotes" );
		ok(typeAttributeRegex.test( "<input type=\"range\"" ), "test double quotes" );
		ok(typeAttributeRegex.test( "<input type=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_"), "test \w" );
		ok(typeAttributeRegex.test( "<input        type=\"range\"" ), "test many preceding spaces" );
		ok(typeAttributeRegex.test( "<input type='range'>" ), "test final attribute (FF)" );

		ok(!typeAttributeRegex.test( "<inputtype=\"range\"" ), "requires preceding space" );
	});
})(jQuery);
{'fraction_non_alphanumeric': 0.21650629163582533, 'fraction_numerical': 0.003700962250185048, 'mean_word_length': 4.751063829787234, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 24, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '1181706', 'n_tokens_mistral': 933, 'n_tokens_neox': 852, 'n_words': 222}