{"size": 1380, "ext": "rktl", "max_stars_repo_path": "compatibility-test/tests/mzlib/restart.rktl", "max_stars_repo_name": "racket/compatibility", "max_stars_repo_stars_event_min_datetime": "2018-04-30T03:47:15.000Z", "max_stars_repo_stars_event_max_datetime": "2021-03-23T06:50:15.000Z", "max_issues_repo_path": "compatibility-test/tests/mzlib/restart.rktl", "max_issues_repo_name": "NoahStoryM/compatibility", "max_issues_repo_issues_event_min_datetime": "2016-10-20T01:47:49.000Z", "max_issues_repo_issues_event_max_datetime": "2020-11-27T21:10:14.000Z", "max_forks_repo_path": "compatibility-test/tests/mzlib/restart.rktl", "max_forks_repo_name": "NoahStoryM/compatibility", "max_forks_repo_forks_event_min_datetime": "2015-03-09T12:20:01.000Z", "max_forks_repo_forks_event_max_datetime": "2021-10-09T05:02:56.000Z"}
{"max_stars_count": 4, "max_issues_count": 6, "max_forks_count": 8, "avg_line_length": 37.2972972973, "max_line_length": 87, "alphanum_fraction": 0.4311594203}

(load-relative "loadtest.rktl")

(require mzlib/restart)

(Section 'restart)

(test #t restart-mzscheme #("ignore-me") values #("") void)
(let ([test-in-out 
       (lambda (pre post in out err?)
         (let ([err-out (open-output-string)])
           (test (if out
                     (string-append "> " out "\n> ")
                     "")
                 'result
                 (let ([s (open-output-string)])
                   (parameterize ([current-input-port (open-input-string in)]
                                  [current-output-port s]
                                  [current-error-port err-out])
                     (restart-mzscheme pre values post void)
                     (get-output-string s))))
           (test err? not (string=? "" (get-output-string err-out)))))])
  (test-in-out #("-q" "ignore-me") #("-i") "(current-command-line-arguments)" "#()" #f)
  (test-in-out #("-q") #("-i") "'Hello" "Hello" #f)
  (test-in-out #("-q") #() "'Hello" "Hello" #f)
  (test-in-out #("-q") #("-e" "1") "" #f #f)
  (test-in-out #("-q") #("-i" "-e" "1") "'Hello" "Hello" #f)
  (test-in-out #("-q") #("-e" "z") "" #f #t)
  (test-in-out #("-q") #("-e" "car" "-i") "'Hello" "Hello" #f)
  (test-in-out #("-q") #("-e" "car") "" #f #f)
  (test-in-out #("-q") #("-l" "scheme/list" "-e" "car") "" #f #t)
  )

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

(report-errs)
