<commit_before>package wx

import (
	"log"
	"testing"
)

type pay_util_test struct {
	Data       string
	Key        string
	MD5        string
	HMACSHA256 string
}

var td = []pay_util_test{
	pay_util_test{"1234", "1111", "81DC9BDB52D04DC20036DBD8313ED055", "388472000D021C1F7D089C6472750CDF80B91775DD7FF69A59D324216CDFF15E"},
	pay_util_test{"abcd", "aaaa", "E2FC714C4727EE9395F324CD2E7F331F", "6FA028B8CC17AE66B0EBF03E26F5E6587C114D1ECDB439D8A578E4D47DDED3EF"},
}
var input = `<xml>
    <return_code><![CDATA[SUCCESS]]></return_code>
    <return_msg><![CDATA[OK]]></return_msg>
    <appid><![CDATA[wx2421b1c4370ec43b]]></appid>
    <mch_id><![CDATA[10000100]]></mch_id>
    <nonce_str><![CDATA[IITRi8Iabbblz1Jc]]></nonce_str>
    <openid><![CDATA[oUpF8uMuAJO_M2pxb1Q9zNjWeS6o]]></openid>
    <sign><![CDATA[7921E432F65EB8ED0CE9755F0E86D72F]]></sign>
    <result_code><![CDATA[SUCCESS]]></result_code>
    <prepay_id><![CDATA[wx201411101639507cbf6ffd8b0779950874]]></prepay_id>
    <trade_type><![CDATA[JSAPI]]></trade_type>
 </xml> `

var xmlStr = "<xml><return_code><![CDATA[SUCCESS]]></return_code>\n" +
	"<return_msg><![CDATA[OK]]></return_msg>\n" +
	"<appid><![CDATA[wx273fe72f2db863ed]]></appid>\n" +
	"<mch_id><![CDATA[1228845802]]></mch_id>\n" +
	"<nonce_str><![CDATA[lCXjx3wNx45HfTV2]]></nonce_str>\n" +
	"<sign><![CDATA[68D7573E006F0661FD2A77BA59124E87]]></sign>\n" +
	"<result_code><![CDATA[SUCCESS]]></result_code>\n" +
	"<openid><![CDATA[oZyc_uPx_oed7b4q1yKmj_3M2fTU]]></openid>\n" +
	"<is_subscribe><![CDATA[N]]></is_subscribe>\n" +
	"<trade_type><![CDATA[NATIVE]]></trade_type>\n" +<commit_msg>add wechat pay fix gofmt warning<commit_after>package wx

import (
	"log"
	"testing"
)

type pay_util_test struct {
	Data       string
	Key        string
	MD5        string
	HMACSHA256 string
}

var td = []pay_util_test{
	{"1234", "1111", "81DC9BDB52D04DC20036DBD8313ED055", "388472000D021C1F7D089C6472750CDF80B91775DD7FF69A59D324216CDFF15E"},
	{"abcd", "aaaa", "E2FC714C4727EE9395F324CD2E7F331F", "6FA028B8CC17AE66B0EBF03E26F5E6587C114D1ECDB439D8A578E4D47DDED3EF"},
}
var input = `<xml>
    <return_code><![CDATA[SUCCESS]]></return_code>
    <return_msg><![CDATA[OK]]></return_msg>
    <appid><![CDATA[wx2421b1c4370ec43b]]></appid>
    <mch_id><![CDATA[10000100]]></mch_id>
    <nonce_str><![CDATA[IITRi8Iabbblz1Jc]]></nonce_str>
    <openid><![CDATA[oUpF8uMuAJO_M2pxb1Q9zNjWeS6o]]></openid>
    <sign><![CDATA[7921E432F65EB8ED0CE9755F0E86D72F]]></sign>
    <result_code><![CDATA[SUCCESS]]></result_code>
    <prepay_id><![CDATA[wx201411101639507cbf6ffd8b0779950874]]></prepay_id>
    <trade_type><![CDATA[JSAPI]]></trade_type>
 </xml> `

var xmlStr = "<xml><return_code><![CDATA[SUCCESS]]></return_code>\n" +
	"<return_msg><![CDATA[OK]]></return_msg>\n" +
	"<appid><![CDATA[wx273fe72f2db863ed]]></appid>\n" +
	"<mch_id><![CDATA[1228845802]]></mch_id>\n" +
	"<nonce_str><![CDATA[lCXjx3wNx45HfTV2]]></nonce_str>\n" +
	"<sign><![CDATA[68D7573E006F0661FD2A77BA59124E87]]></sign>\n" +
	"<result_code><![CDATA[SUCCESS]]></result_code>\n" +
	"<openid><![CDATA[oZyc_uPx_oed7b4q1yKmj_3M2fTU]]></openid>\n" +
	"<is_subscribe><![CDATA[N]]></is_subscribe>\n" +
	"<trade_type><![CDATA[NATIVE]]></trade_type>\n" +
{'fraction_non_alphanumeric': 0.20878778435649736, 'fraction_numerical': 0.15768152072296665, 'mean_word_length': 7.5828877005347595, 'pattern_counts': {'":': 0, '<': 129, '<?xml version=': 0, '>': 129, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 8}, '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': '6395906', 'n_tokens_mistral': 1822, 'n_tokens_neox': 1513, 'n_words': 111}