<commit_before>#lang racket/base

(require "private/drracket-test-util.rkt"
         racket/class
         framework)

(define (main)
  (fire-up-drscheme-and-run-tests
   (λ ()
     (let ([drs (wait-for-drscheme-frame)])
       (set-module-language!)
       (do-execute drs)
       (queue-callback/res (λ () (handler:edit-file (collection-file-path "map.rkt" "racket" "private"))))
       
       (preferences:set 'framework:coloring-active #f)
       (click-check-syntax-and-check-errors drs "syncheck-eval-compile-time.rkt")))))


;; copied from syncheck-test.rkt ....
(define (click-check-syntax-and-check-errors drs test)
  (click-check-syntax-button drs)
  (wait-for-computation drs)
  (when (queue-callback/res (λ () (send (send drs get-definitions-text) in-edit-sequence?)))
    (error 'syncheck-test.rkt "still in edit sequence for ~s" test))
  
  (let ([err (queue-callback/res (λ () (send drs syncheck:get-error-report-contents)))]) 
    (when err
      (fprintf (current-error-port)
               "FAILED ~s\n   error report window is visible:\n   ~a\n"
               test
               err))))
(define (click-check-syntax-button drs)
  (test:run-one (lambda () (send (send drs syncheck:get-button) command))))

(main)<commit_msg>adjust a syncheck test so hopefully to avoid mutating datastructures from the wrong thread<commit_after>#lang racket/base

(require "private/drracket-test-util.rkt"
         racket/class
         framework)

(define (main)
  (fire-up-drscheme-and-run-tests
   (λ ()
     (let ([drs (wait-for-drscheme-frame)])
       (set-module-language!)
       (do-execute drs)
       (queue-callback/res
        (λ () 
          (preferences:set 'framework:coloring-active #f)
          (handler:edit-file (collection-file-path "map.rkt" "racket" "private"))))
       
       (click-check-syntax-and-check-errors drs "syncheck-eval-compile-time.rkt")))))


;; copied from syncheck-test.rkt ....
(define (click-check-syntax-and-check-errors drs test)
  (click-check-syntax-button drs)
  (wait-for-computation drs)
  (when (queue-callback/res (λ () (send (send drs get-definitions-text) in-edit-sequence?)))
    (error 'syncheck-test.rkt "still in edit sequence for ~s" test))
  
  (let ([err (queue-callback/res (λ () (send drs syncheck:get-error-report-contents)))]) 
    (when err
      (fprintf (current-error-port)
               "FAILED ~s\n   error report window is visible:\n   ~a\n"
               test
               err))))
(define (click-check-syntax-button drs)
  (test:run-one (lambda () (send (send drs syncheck:get-button) command))))

(main)
{'fraction_non_alphanumeric': 0.1569385388480866, 'fraction_numerical': 0.0, 'mean_word_length': 2.828402366863905, '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': '6435603', 'n_tokens_mistral': 898, 'n_tokens_neox': 876, 'n_words': 190}