<commit_before>(ns com.hypirion.smallex.test.lexer
  (:require [clojure.java.io :as io]
            [clojure.pprint :refer [pprint]])
  (:use [clojure.test])
  (:import (com.hypirion.smallex SMLXLexer)))

(deftest test-read
  (with-open [rdr (io/reader (io/resource "clojure.smlx"))]
    (is (try
          (doall (iterator-seq (SMLXLexer. rdr)))
          true
          (catch Exception _ false)))))<commit_msg>Check for error items in SMLXLexer test.<commit_after>(ns com.hypirion.smallex.test.lexer
  (:require [clojure.java.io :as io]
            [clojure.pprint :refer [pprint]])
  (:use [clojure.test])
  (:import (com.hypirion.smallex SMLXLexer)))

(deftest test-read
  (with-open [rdr (io/reader (io/resource "clojure.smlx"))]
    (is (not-any? #(= :error (:type %)) (iterator-seq (SMLXLexer. rdr))))))
{'fraction_non_alphanumeric': 0.17509247842170161, 'fraction_numerical': 0.0, 'mean_word_length': 3.4371584699453552, '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': '2353551', 'n_tokens_mistral': 343, 'n_tokens_neox': 330, 'n_words': 64}