cleanups in test suites
svn: r3763
This commit is contained in:
parent
3190033d7a
commit
3cf662e760
|
@ -61,7 +61,7 @@
|
|||
(fw:preferences:set 'framework:file-dialogs 'common)
|
||||
(open-dialog)
|
||||
(let ([dlg (wait-for-new-frame drs)])
|
||||
(send (find-labelled-window "Full pathname") focus)
|
||||
(send (find-labelled-window "Filename:") focus)
|
||||
(fw:test:keystroke #\a (list (case (system-type)
|
||||
[(windows) 'control]
|
||||
[(macosx macos) 'meta]
|
||||
|
|
|
@ -1081,7 +1081,7 @@ the settings above should match r5rs
|
|||
(clear-definitions drs)
|
||||
(for-each fw:test:keystroke
|
||||
(string->list
|
||||
"(define (f n)\n(cond ((zero? n) '())\n(else (cons n (f (- n 1))))))\n(f 200)"))
|
||||
"(define (f n)\n(cond ((zero? n) null)\n(else (cons n (f (- n 1))))))\n(f 200)"))
|
||||
(test "Constructor" #f #f
|
||||
(case-lambda
|
||||
[(x) (not (member #\newline (string->list x)))]
|
||||
|
@ -1223,11 +1223,11 @@ the settings above should match r5rs
|
|||
(let ([drs (wait-for-drscheme-frame)])
|
||||
(fw:test:menu-select "Language" "Clear All Teachpacks"))
|
||||
|
||||
(go mred)
|
||||
(go mzscheme)
|
||||
(go beginner)
|
||||
(go beginner/abbrev)
|
||||
(go intermediate)
|
||||
(go intermediate/lambda)
|
||||
(go advanced)
|
||||
(go r5rs)))
|
||||
(go r5rs)
|
||||
(go mred)
|
||||
(go mzscheme)))
|
||||
|
|
|
@ -66,6 +66,7 @@ There shouldn't be any error (but add in a bug that triggers one to be sure!)
|
|||
|
||||
(define test-data
|
||||
(list
|
||||
|
||||
;; basic tests
|
||||
(make-test "1"
|
||||
"1"
|
||||
|
@ -503,8 +504,6 @@ There shouldn't be any error (but add in a bug that triggers one to be sure!)
|
|||
void
|
||||
void)
|
||||
|
||||
|
||||
|
||||
;; error escape handler test
|
||||
(make-test
|
||||
"(let ([old (error-escape-handler)])\n(+ (let/ec k\n(dynamic-wind\n(lambda () (error-escape-handler (lambda () (k 5))))\n(lambda () (car))\n(lambda () (error-escape-handler old))))\n10))"
|
||||
|
|
|
@ -61,33 +61,16 @@ signal failures when there aren't any.
|
|||
|
||||
| This tests the misc (non-scheme) keybindings
|
||||
|
||||
- searching: |# search.ss #|
|
||||
|
||||
| This tests the seaching frame.
|
||||
|
||||
- info: |# info-frame.ss #|
|
||||
|
||||
| This tests the info frame. (ie that toolbar on the bottom of the
|
||||
screen)
|
||||
|
||||
- group tests: |# group-test.ss #|
|
||||
|
||||
| make sure that mred:the-frame-group records frames correctly.
|
||||
| fake user input expected.
|
||||
|
||||
- scheme mode |# scheme.ss #|
|
||||
|
||||
| Make sure that Scheme things work in scheme mode.
|
||||
|
||||
- saving tests:
|
||||
|
||||
| These tests will make sure that the usual checks against a user
|
||||
| losing their work are in place.
|
||||
|
||||
- autosaving: |# autosave.ss #|
|
||||
- closing: |# close.ss #|
|
||||
- quitting: |# quit.ss #|
|
||||
|
||||
- interactive tests
|
||||
|
||||
| these tests require intervention by people. Clicking and whatnot
|
||||
|
|
|
@ -116,13 +116,13 @@
|
|||
(wait-for-frame frame-name)
|
||||
(send-sexp-to-mred
|
||||
`(test:menu-select "File" "Open..."))
|
||||
(wait-for-frame "Get file")
|
||||
(wait-for-frame "Open File")
|
||||
(call-with-output-file tmp-file
|
||||
(lambda (port)
|
||||
(display test-file-contents port))
|
||||
'truncate)
|
||||
(send-sexp-to-mred
|
||||
`(begin (send (find-labelled-window "Full pathname") focus)
|
||||
`(begin (send (find-labelled-window "Filename:") focus)
|
||||
,(case (system-type)
|
||||
[(macos macosx) `(test:keystroke #\a '(meta))]
|
||||
[(unix) `(test:keystroke #\a '(meta))]
|
||||
|
|
3
collects/tests/framework/framework-test
Normal file
3
collects/tests/framework/framework-test
Normal file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
exec mred -qu main.ss "$@"
|
3
collects/tests/framework/framework-test-engine
Normal file
3
collects/tests/framework/framework-test-engine
Normal file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
exec mred -qu framework-test-engine.ss "$@"
|
|
@ -1,10 +1,3 @@
|
|||
(module info (lib "infotab.ss" "setup")
|
||||
(define name "Framework Test Suite")
|
||||
(define compile-omit-files '("key-specs.ss" "utils.ss" "receive-sexps-port.ss"))
|
||||
#| Do not create these launchers -- they won't look good in /usr/bin
|
||||
(define mred-launcher-libraries (list "framework-test-engine.ss"))
|
||||
(define mred-launcher-names (list "Framework Test Engine"))
|
||||
(define mzscheme-launcher-libraries (list "main.ss"))
|
||||
(define mzscheme-launcher-names (list "Framework Test"))
|
||||
|#
|
||||
)
|
||||
(define compile-omit-files '("key-specs.ss" "utils.ss" "receive-sexps-port.ss")))
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
[define (get-editor%) ,class]
|
||||
(super-instantiate ()))
|
||||
())])
|
||||
(send (send f get-editor) set-max-undo-history 10)
|
||||
(send f show #t)
|
||||
(send f get-label)))])
|
||||
(wait-for-frame label)
|
||||
|
@ -26,6 +27,7 @@
|
|||
`(begin
|
||||
;; remove the `a' to avoid save dialog boxes (and test them, I suppose)
|
||||
(send (send (get-top-level-focus-window) get-editor) undo)
|
||||
(send (send (get-top-level-focus-window) get-editor) undo)
|
||||
|
||||
(send (send (get-top-level-focus-window) get-editor) lock #t)
|
||||
(send (send (get-top-level-focus-window) get-editor) lock #f)))
|
||||
|
@ -33,17 +35,18 @@
|
|||
`(send (get-top-level-focus-window) close))
|
||||
(send-sexp-to-mred `(map (lambda (x) (send x get-label)) (get-top-level-windows)))))))
|
||||
|
||||
|
||||
#|
|
||||
(test-creation 'frame:text%
|
||||
'(text:basic-mixin (editor:basic-mixin text%))
|
||||
'text:basic-mixin-creation)
|
||||
(test-creation 'frame:text%
|
||||
'text:basic%
|
||||
'text:basic-creation)
|
||||
|
||||
|#
|
||||
(test-creation 'frame:text%
|
||||
'(editor:file-mixin text:keymap%)
|
||||
'editor:file-mixin-creation)
|
||||
|
||||
(test-creation 'frame:text%
|
||||
'text:file%
|
||||
'text:file-creation)
|
||||
|
|
Loading…
Reference in New Issue
Block a user