Skip to content

Commit

Permalink
as in 12c4cfc, disable shrubbery tests in text-indent-guides.rkt
Browse files Browse the repository at this point in the history
Also add a message when tests are being skipped
  • Loading branch information
rfindler committed Nov 7, 2024
1 parent 12c4cfc commit b1f0f6a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
17 changes: 12 additions & 5 deletions gui-test/framework/tests/racket.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,12 @@
(check-equal? (send t forward-match 8 (send t last-position)) 13)
(check-equal? (send t forward-match 13 (send t last-position)) 16))

(define shrubbery-available?
(with-handlers ([exn:fail? (lambda (x) #f)])
(collection-path "shrubbery")
#t))
(unless shrubbery-available?
(printf "racket.rkt: skipping tests that require shrubbery\n"))

(define (test-highlighting)
(preferences:set 'framework:paren-color-scheme 'shades-of-gray)
Expand Down Expand Up @@ -388,11 +394,12 @@
(check-equal? (check-parens "()" 0) '((0 2)))
(check-equal? (check-parens "(())" 0) '((0 4) (1 3)))
(check-equal? (check-parens "( () () )" 0) '((0 9) (2 4) (5 7)))
(check-equal? (check-shrub-parens "1+2" 0) '((0 3)))
(check-equal? (check-shrub-parens " 1+2\n 3+4" 1) '((1 4)))
(check-equal? (check-shrub-parens " 1+2\n 3+4" 4) '((1 4)))
(check-equal? (check-shrub-parens "block:\n 1+2\n 3+4" 0) '((0 16) (8 11) (8 16) (13 16)))
(check-equal? (check-shrub-parens "1+2\n\n3+4" 5) '((5 8))))
(when shrubbery-available?
(check-equal? (check-shrub-parens "1+2" 0) '((0 3)))
(check-equal? (check-shrub-parens " 1+2\n 3+4" 1) '((1 4)))
(check-equal? (check-shrub-parens " 1+2\n 3+4" 4) '((1 4)))
(check-equal? (check-shrub-parens "block:\n 1+2\n 3+4" 0) '((0 16) (8 11) (8 16) (13 16)))
(check-equal? (check-shrub-parens "1+2\n\n3+4" 5) '((5 8)))))

(define (test-indentation before)
(define t (new racket:text%))
Expand Down
10 changes: 7 additions & 3 deletions gui-test/framework/tests/text-indent-guides-test.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,13 @@
(check-equal? lines
(set))))


(when (with-handlers ([exn:fail? (lambda (x) #f)])
(collection-path "shrubbery"))
(define shrubbery-available?
(with-handlers ([exn:fail? (lambda (x) #f)])
(collection-path "shrubbery")
#t))
(unless shrubbery-available?
(printf "text-indent-guides-test.rkt: skipping tests that require shrubbery\n"))
(when shrubbery-available?
(define t (new (text:indent-guides-mixin text%)))
(send t insert
(string-append
Expand Down

0 comments on commit b1f0f6a

Please sign in to comment.