cleanups in test suites

svn: r3763
This commit is contained in:
Robby Findler 2006-07-19 04:34:48 +00:00
parent 3190033d7a
commit 3cf662e760
9 changed files with 20 additions and 36 deletions

View File

@ -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]

View File

@ -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)))

View File

@ -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))"

View File

@ -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

View File

@ -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))]

View File

@ -0,0 +1,3 @@
#!/bin/sh
exec mred -qu main.ss "$@"

View File

@ -0,0 +1,3 @@
#!/bin/sh
exec mred -qu framework-test-engine.ss "$@"

View File

@ -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")))

View File

@ -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)