<commit_before>(defpackage :cl-hash-util-test
  (:use :cl :fiveam :cl-hash-util))

(in-package :cl-hash-util-test)

(eval-when (:compile-toplevel :load-toplevel :execute)
  (def-suite cl-hash-util-test))

(in-suite cl-hash-util-test)

(defparameter ht (hash ('a (hash ('b 3)))))

(test hget
  (is (= 3 (hget ht '(a b))))
  (is-false (hu:hash-get ht '(c d)))
  (signals type-error (setf (hget ht '(b c)) t))
  (is (= 4 (setf (hash-get ht '(a c)) 4)))
  (is (= 4 (hget ht '(a c)))))<commit_msg>A few more hget tests<commit_after>(defpackage :cl-hash-util-test
  (:use :cl :fiveam :cl-hash-util))

(in-package :cl-hash-util-test)

(eval-when (:compile-toplevel :load-toplevel :execute)
  (def-suite cl-hash-util-test))

(in-suite cl-hash-util-test)

(defparameter ht (hash ('a (hash ('b 3)))))

(test hget
  (is (= 3 (hget ht '(a b))))
  (is-false (hash-get ht '(c d)))
  (signals simple-error
    (let ((*error-on-nil* t))
      (hget ht '(c d))))
  (is (= 3 (let ((*error-on-nil* t))
             (hget ht '(a b)))))
  (signals type-error (setf (hget ht '(b c)) t))
  (is (= 4 (setf (hash-get ht '(a c)) 4)))
  (is (= 4 (hget ht '(a c)))))
{'fraction_non_alphanumeric': 0.23110720562390158, 'fraction_numerical': 0.009666080843585237, 'mean_word_length': 3.3473282442748094, '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': '1110181', 'n_tokens_mistral': 529, 'n_tokens_neox': 506, 'n_words': 137}