<commit_before>
(load-relative "loadtest.ss")

(require (lib "restart.ss"))

(Section 'restart)

(test #t restart-mzscheme #("ignore-me") values #("-qmv") void)
(let ([test-in-out 
       (lambda (pre post in out)
	 (test (string-append "> " out "\n> ")
	       'result
	       (let ([s (open-output-string)])
		 (parameterize ([current-input-port (open-input-string in)]
				[current-output-port s])
		   (restart-mzscheme pre values post void)
		   (get-output-string s)))))])
  (test-in-out #("ignore-me") #("-qm") "(current-command-line-arguments)" "#0()")
  (test-in-out #("") #("-qm") "'Hello" "hello")
  (test-in-out #("-g") #("-qm") "'Hello" "Hello")
  (test-in-out #("") #("-qmg") "'Hello" "Hello"))

;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(report-errs)
<commit_msg>fix case in restart test<commit_after>
(load-relative "loadtest.ss")

(require (lib "restart.ss"))

(Section 'restart)

(test #t restart-mzscheme #("ignore-me") values #("-qmv") void)
(let ([test-in-out 
       (lambda (pre post in out)
	 (test (string-append "> " out "\n> ")
	       'result
	       (let ([s (open-output-string)])
		 (parameterize ([current-input-port (open-input-string in)]
				[current-output-port s])
		   (restart-mzscheme pre values post void)
		   (get-output-string s)))))])
  (test-in-out #("ignore-me") #("-qm") "(current-command-line-arguments)" "#0()")
  (test-in-out #("") #("-qm") "'Hello" "Hello")
  (test-in-out #("-G") #("-qm") "'Hello" "hello")
  (test-in-out #("") #("-qmG") "'Hello" "hello"))

;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(report-errs)

{'fraction_non_alphanumeric': 0.28862047043865224, 'fraction_numerical': 0.0012714558169103624, 'mean_word_length': 3.7267267267267266, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '4719460', 'n_tokens_mistral': 642, 'n_tokens_neox': 603, 'n_words': 128}