<commit_before><!doctype html>

<title>CodeMirror: Test Suite</title>
<meta charset="utf-8"/>
<link rel=stylesheet href="../doc/docs.css">

<link rel="stylesheet" href="../lib/codemirror.css">
<link rel="stylesheet" href="mode_test.css">
<script src="../doc/activebookmark.js"></script>
<script src="../lib/codemirror.js"></script>
<script src="../addon/mode/overlay.js"></script>
<script src="../addon/mode/multiplex.js"></script>
<script src="../addon/search/searchcursor.js"></script>
<script src="../addon/dialog/dialog.js"></script>
<script src="../addon/edit/matchbrackets.js"></script>
<script src="../addon/comment/comment.js"></script>
<script src="../mode/javascript/javascript.js"></script>
<script src="../mode/clike/clike.js"></script>
<script src="../mode/php/php.js"></script>
<script src="../mode/xml/xml.js"></script>
<script src="../keymap/vim.js"></script>
<script src="../keymap/emacs.js"></script>
<script src="../keymap/sublime.js"></script>

<style type="text/css">
  .ok {color: #090;}
  .fail {color: #e00;}
  .error {color: #c90;}
  .done {font-weight: bold;}
  #progress {
  background: #45d;
  color: white;
  text-shadow: 0 0 1px #45d, 0 0 2px #45d, 0 0 3px #45d;
  font-weight: bold;
  white-space: pre;
  }
  #testground {
  visibility: hidden;
  }
  #testground.offscreen {
  visibility: visible;
  position: absolute;
  left: -10000px;
  top: -10000px;
  }
  .CodeMirror { border: 1px solid black; }
</style>

<div id=nav>
  <a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../doc/logo.png"></a>

  <ul>
    <li><a href="../index.html">Home</a>
    <li><a href="../doc/manual.html">Manual</a>
    <li><a href="https://github.com/codemirror/codemirror">Code</a>
  </ul>
  <ul>
    <li><a class=active href="#">Test suite</a>
  </ul>
</div>

<article>
  <h2>Test Suite</h2>

    <p>A limited set of programmatic sanity tests for CodeMirror.</p>

    <div style="border: 1px solid black; padding: 1px; max-width: 700px;">
      <div style="width: 0px;" id=progress><div style="padding: 3px;">Ran <span id="progress_ran">0</span><span id="progress_total"> of 0</span> tests</div></div>
    </div>
    <p id=status>Please enable JavaScript...</p>
    <div id=output></div>

    <div id=testground></div>

    <script src="driver.js"></script>
    <script src="test.js"></script>
    <script src="doc_test.js"></script>
    <script src="multi_test.js"></script>
    <script src="scroll_test.js"></script>
    <script src="comment_test.js"></script>
    <script src="search_test.js"></script>
    <script src="mode_test.js"></script>
    <script src="../mode/javascript/test.js"></script>
    <script src="../mode/php/test.js"></script>
    <script src="../mode/css/css.js"></script>
    <script src="../mode/css/test.js"></script>
    <script src="../mode/css/scss_test.js"></script>
    <script src="../mode/css/less_test.js"></script>
    <script src="../mode/xml/xml.js"></script>
    <script src="../mode/xml/test.js"></script>
    <script src="../mode/htmlmixed/htmlmixed.js"></script>
    <script src="../mode/ruby/ruby.js"></script>
    <script src="../mode/ruby/test.js"></script>
    <script src="../mode/haml/haml.js"></script>
    <script src="../mode/haml/test.js"></script>
    <script src="../mode/markdown/markdown.js"></script>
    <script src="../mode/markdown/test.js"></script>
    <script src="../mode/slim/slim.js"></script>
    <script src="../mode/slim/test.js"></script>
    <script src="../mode/gfm/gfm.js"></script>
    <script src="../mode/gfm/test.js"></script>
    <script src="../mode/shell/shell.js"></script>
    <script src="../mode/shell/test.js"></script>
    <script src="../mode/stex/stex.js"></script>
    <script src="../mode/stex/test.js"></script>
    <script src="../mode/textile/textile.js"></script>
    <script src="../mode/textile/test.js"></script>
    <script src="../mode/verilog/verilog.js"></script>
    <script src="../mode/verilog/test.js"></script>
    <script src="../mode/xquery/xquery.js"></script>
    <script src="../mode/xquery/test.js"></script>
    <script src="../addon/mode/multiplex_test.js"></script>
    <script src="vim_test.js"></script>
    <script src="emacs_test.js"></script>
    <script src="sublime_test.js"></script>
    <script>
      window.onload = runHarness;
      CodeMirror.on(window, 'hashchange', runHarness);

      function esc(str) {
        return str.replace(/[<&]/, function(ch) { return ch == "<" ? "&lt;" : "&amp;"; });
      }

      var output = document.getElementById("output"),
          progress = document.getElementById("progress"),
          progressRan = document.getElementById("progress_ran").childNodes[0],
          progressTotal = document.getElementById("progress_total").childNodes[0];
      var count = 0,
          failed = 0,
          skipped = 0,
          bad = "",
          running = false, // Flag that states tests are running
          quit = false, // Flag to quit tests ASAP
          verbose = false; // Adds message for *every* test to output

      function runHarness(){
        if (running) {
          quit = true;
          setStatus("Restarting tests...", '', true);
          setTimeout(function(){runHarness();}, 500);
          return;
        }
        filters = [];
        verbose = false;
        if (window.location.hash.substr(1)){
          var strings = window.location.hash.substr(1).split(",");
          while (strings.length) {
            var s = strings.shift();
            if (s === "verbose")
              verbose = true;
            else
              filters.push(parseTestFilter(decodeURIComponent(s)));;
          }
        }
        quit = false;
        running = true;
        setStatus("Loading tests...");
        count = 0;
        failed = 0;
        skipped = 0;
        bad = "";
        totalTests = countTests();
        progressTotal.nodeValue = " of " + totalTests;<commit_msg>[tests] Clean up test/index.html<commit_after><!doctype html>

<meta charset="utf-8"/>
<title>CodeMirror: Test Suite</title>
<link rel=stylesheet href="../doc/docs.css">

<link rel="stylesheet" href="../lib/codemirror.css">
<link rel="stylesheet" href="mode_test.css">
<script src="../doc/activebookmark.js"></script>
<script src="../lib/codemirror.js"></script>
<script src="../addon/mode/overlay.js"></script>
<script src="../addon/mode/multiplex.js"></script>
<script src="../addon/search/searchcursor.js"></script>
<script src="../addon/dialog/dialog.js"></script>
<script src="../addon/edit/matchbrackets.js"></script>
<script src="../addon/comment/comment.js"></script>
<script src="../mode/css/css.js"></script>
<script src="../mode/clike/clike.js"></script>
<!-- clike must be after css or vim and sublime tests will fail -->
<script src="../mode/gfm/gfm.js"></script>
<script src="../mode/haml/haml.js"></script>
<script src="../mode/htmlmixed/htmlmixed.js"></script>
<script src="../mode/javascript/javascript.js"></script>
<script src="../mode/markdown/markdown.js"></script>
<script src="../mode/php/php.js"></script>
<script src="../mode/ruby/ruby.js"></script>
<script src="../mode/shell/shell.js"></script>
<script src="../mode/slim/slim.js"></script>
<script src="../mode/stex/stex.js"></script>
<script src="../mode/textile/textile.js"></script>
<script src="../mode/verilog/verilog.js"></script>
<script src="../mode/xml/xml.js"></script>
<script src="../mode/xquery/xquery.js"></script>
<script src="../keymap/emacs.js"></script>
<script src="../keymap/sublime.js"></script>
<script src="../keymap/vim.js"></script>

<style type="text/css">
  .ok {color: #090;}
  .fail {color: #e00;}
  .error {color: #c90;}
  .done {font-weight: bold;}
  #progress {
  background: #45d;
  color: white;
  text-shadow: 0 0 1px #45d, 0 0 2px #45d, 0 0 3px #45d;
  font-weight: bold;
  white-space: pre;
  }
  #testground {
  visibility: hidden;
  }
  #testground.offscreen {
  visibility: visible;
  position: absolute;
  left: -10000px;
  top: -10000px;
  }
  .CodeMirror { border: 1px solid black; }
</style>

<div id=nav>
  <a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../doc/logo.png"></a>

  <ul>
    <li><a href="../index.html">Home</a>
    <li><a href="../doc/manual.html">Manual</a>
    <li><a href="https://github.com/codemirror/codemirror">Code</a>
  </ul>
  <ul>
    <li><a class=active href="#">Test suite</a>
  </ul>
</div>

<article>
  <h2>Test Suite</h2>

    <p>A limited set of programmatic sanity tests for CodeMirror.</p>

    <div style="border: 1px solid black; padding: 1px; max-width: 700px;">
      <div style="width: 0px;" id=progress><div style="padding: 3px;">Ran <span id="progress_ran">0</span><span id="progress_total"> of 0</span> tests</div></div>
    </div>
    <p id=status>Please enable JavaScript...</p>
    <div id=output></div>

    <div id=testground></div>

    <script src="driver.js"></script>
    <script src="test.js"></script>
    <script src="doc_test.js"></script>
    <script src="multi_test.js"></script>
    <script src="scroll_test.js"></script>
    <script src="comment_test.js"></script>
    <script src="search_test.js"></script>
    <script src="mode_test.js"></script>
    
    <script src="../mode/css/test.js"></script>
    <script src="../mode/css/scss_test.js"></script>
    <script src="../mode/css/less_test.js"></script>
    <script src="../mode/gfm/test.js"></script>
    <script src="../mode/haml/test.js"></script>
    <script src="../mode/javascript/test.js"></script>
    <script src="../mode/markdown/test.js"></script>
    <script src="../mode/php/test.js"></script>
    <script src="../mode/ruby/test.js"></script>
    <script src="../mode/shell/test.js"></script>
    <script src="../mode/slim/test.js"></script>
    <script src="../mode/stex/test.js"></script>
    <script src="../mode/textile/test.js"></script>
    <script src="../mode/verilog/test.js"></script>
    <script src="../mode/xml/test.js"></script>
    <script src="../mode/xquery/test.js"></script>
    <script src="../addon/mode/multiplex_test.js"></script>
    <script src="emacs_test.js"></script>
    <script src="sublime_test.js"></script>
    <script src="vim_test.js"></script>
    <script>
      window.onload = runHarness;
      CodeMirror.on(window, 'hashchange', runHarness);

      function esc(str) {
        return str.replace(/[<&]/, function(ch) { return ch == "<" ? "&lt;" : "&amp;"; });
      }

      var output = document.getElementById("output"),
          progress = document.getElementById("progress"),
          progressRan = document.getElementById("progress_ran").childNodes[0],
          progressTotal = document.getElementById("progress_total").childNodes[0];
      var count = 0,
          failed = 0,
          skipped = 0,
          bad = "",
          running = false, // Flag that states tests are running
          quit = false, // Flag to quit tests ASAP
          verbose = false; // Adds message for *every* test to output

      function runHarness(){
        if (running) {
          quit = true;
          setStatus("Restarting tests...", '', true);
          setTimeout(function(){runHarness();}, 500);
          return;
        }
        filters = [];
        verbose = false;
        if (window.location.hash.substr(1)){
          var strings = window.location.hash.substr(1).split(",");
          while (strings.length) {
            var s = strings.shift();
            if (s === "verbose")
              verbose = true;
            else
              filters.push(parseTestFilter(decodeURIComponent(s)));
          }
        }
        quit = false;
        running = true;
        setStatus("Loading tests...");
        count = 0;
        failed = 0;
        skipped = 0;
        bad = "";
        totalTests = countTests();
        progressTotal.nodeValue = " of " + totalTests;
{'fraction_non_alphanumeric': 0.215073841453064, 'fraction_numerical': 0.010524528942454592, 'mean_word_length': 2.909422694094227, 'pattern_counts': {'":': 0, '<': 338, '<?xml version=': 0, '>': 334, 'https://': 2, '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': '4391356', 'n_tokens_mistral': 3992, 'n_tokens_neox': 3846, 'n_words': 714}