<commit_before>package org.codehaus.groovy.grails.web.taglib;

import org.codehaus.groovy.runtime.InvokerHelper
import org.codehaus.groovy.grails.commons.metaclass.ExpandoMetaClass

class ApplicationTagLibTests extends AbstractGrailsTagTests {

	void testCreateLinkURLEncoding() {
    /*

		StringWriter sw = new StringWriter();

		withTag("createLink", sw) { tag ->

		    println grailsApplication.allClasses.inspect()
			// test URL encoding. Params unordered to have to try one test at a time
			def attrs = [action:'testAction', controller: 'testController',
			    params:['name':'<NAME>']]
			tag.call( attrs )

			println "output: ${sw}"

			assertEquals '<a href="/testController/testAction?name=Marc%20Palmer"></a>"', sw.toString()
		}*/

	}

	void testCreateLinkURLEncodingWithHTMLChars() {
/*
        InvokerHelper.getInstance().getMetaRegistry().removeMetaClass(String.class)

		StringWriter sw = new StringWriter();

		withTag("createLink", sw) { tag ->

			// test URL encoding is done but HTML encoding isn't, only want the one here.
			def attrs = [action:'testAction', controller: 'testController',
			    params:['email':'<<EMAIL>>']]
			tag.call( attrs )

			println "output: ${sw}"

			assertEquals '<a href="/testController/testAction?email=%3Cmarc%40anyware%2Eco%2Euk%3E"></a>"', sw.toString()
		}

*/
	}

}<commit_msg>uncomment test methods and make changes to assertions<commit_after>package org.codehaus.groovy.grails.web.taglib;

import org.codehaus.groovy.runtime.InvokerHelper
import org.codehaus.groovy.grails.commons.metaclass.ExpandoMetaClass

class ApplicationTagLibTests extends AbstractGrailsTagTests {

	void testCreateLinkURLEncoding() {
		StringWriter sw = new StringWriter();

		withTag("createLink", sw) { tag ->

			// test URL encoding. Params unordered to have to try one test at a time
			def attrs = [action:'testAction', controller: 'testController',
			    params:['name':'<NAME>']]
			tag.call( attrs )

			assertEquals '/testController/testAction?name=Marc+Palmer', sw.toString()
		}
	}

	void testCreateLinkURLEncodingWithHTMLChars() {
		StringWriter sw = new StringWriter();

		withTag("createLink", sw) { tag ->

			// test URL encoding is done but HTML encoding isn't, only want the one here.
			def attrs = [action:'testAction', controller: 'testController',
			    params:['email':'<<EMAIL>>']]
			tag.call( attrs )

			assertEquals '/testController/testAction?email=%3Cmarc%40anyware.co.uk%3E', sw.toString()
		}
	}

}
{'fraction_non_alphanumeric': 0.1333872271624899, 'fraction_numerical': 0.004850444624090542, 'mean_word_length': 4.475663716814159, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 17, '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': '2280150', 'n_tokens_mistral': 860, 'n_tokens_neox': 760, 'n_words': 174}