<commit_before>var __testFiles = {
  "test1.txt" : "line1",
  "test2.txt" : "line1\n",
  "test3.txt" : "line1\r\nline2",
  "test4.txt" : "",
  "test5.txt" : "item1\nitem2\n\n",
  "test6.txt" : "\rline2",
  "test7.txt" : "\n"
};
ajax = function(url) { return __testFiles[url]; };

String[] s1 = loadStrings("test1.txt");
_checkEqual(1, s1.length);
_checkEqual("line1", s1[0]);

String[] s2 = loadStrings("test2.txt");
_checkEqual(1, s2.length);
_checkEqual("line1", s2[0]);

String[] s3 = loadStrings("test3.txt");
_checkEqual(2, s3.length);
_checkEqual("line1", s3[0]);
_checkEqual("line2", s3[1]);

String[] s4 = loadStrings("test4.txt");
_checkEqual(0, s4.length);

String[] s5 = loadStrings("test5.txt");
_checkEqual(3, s5.length);
_checkEqual("item1", s5[0]);<commit_msg>Fixing loadStrings mock objects for the closure release testing.<commit_after>var __testFiles = {
  "test1.txt" : "line1",
  "test2.txt" : "line1\n",
  "test3.txt" : "line1\r\nline2",
  "test4.txt" : "",
  "test5.txt" : "item1\nitem2\n\n",
  "test6.txt" : "\rline2",
  "test7.txt" : "\n"
};
XMLHttpRequest = function() {};
XMLHttpRequest.prototype = {
  open: function(method, url) { this.responseText = __testFiles[url]; },
  status: 200,
  send: function() {},
  setRequestHeader: function() {}
};

String[] s1 = loadStrings("test1.txt");
_checkEqual(1, s1.length);
_checkEqual("line1", s1[0]);

String[] s2 = loadStrings("test2.txt");
_checkEqual(1, s2.length);
_checkEqual("line1", s2[0]);

String[] s3 = loadStrings("test3.txt");
_checkEqual(2, s3.length);
_checkEqual("line1", s3[0]);
_checkEqual("line2", s3[1]);

String[] s4 = loadStrings("test4.txt");
_checkEqual(0, s4.length);

String[] s5 = loadStrings("test5.txt");
_checkEqual(3, s5.length);
_checkEqual("item1", s5[0]);
{'fraction_non_alphanumeric': 0.2228538942581012, 'fraction_numerical': 0.05741898806139852, 'mean_word_length': 5.5427509293680295, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '782873', 'n_tokens_mistral': 733, 'n_tokens_neox': 729, 'n_words': 125}