From 17eb93a99600ccf58c724b97e3fd558727e55a48 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Wed, 19 Jul 2006 04:34:48 +0000 Subject: [PATCH] cleanups in test suites svn: r3763 original commit: 3cf662e760d8af975999f90011687c2346867c85 --- collects/tests/framework/README | 17 ----------------- collects/tests/framework/frame.ss | 4 ++-- collects/tests/framework/framework-test | 3 +++ collects/tests/framework/framework-test-engine | 3 +++ collects/tests/framework/text.ss | 7 +++++-- 5 files changed, 13 insertions(+), 21 deletions(-) create mode 100644 collects/tests/framework/framework-test create mode 100644 collects/tests/framework/framework-test-engine diff --git a/collects/tests/framework/README b/collects/tests/framework/README index 90aff4dd..c5db071a 100644 --- a/collects/tests/framework/README +++ b/collects/tests/framework/README @@ -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 diff --git a/collects/tests/framework/frame.ss b/collects/tests/framework/frame.ss index 13a8b9c1..3ac6d30b 100644 --- a/collects/tests/framework/frame.ss +++ b/collects/tests/framework/frame.ss @@ -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))] diff --git a/collects/tests/framework/framework-test b/collects/tests/framework/framework-test new file mode 100644 index 00000000..7d7496a3 --- /dev/null +++ b/collects/tests/framework/framework-test @@ -0,0 +1,3 @@ +#!/bin/sh + +exec mred -qu main.ss "$@" diff --git a/collects/tests/framework/framework-test-engine b/collects/tests/framework/framework-test-engine new file mode 100644 index 00000000..0fd8bdcb --- /dev/null +++ b/collects/tests/framework/framework-test-engine @@ -0,0 +1,3 @@ +#!/bin/sh + +exec mred -qu framework-test-engine.ss "$@" diff --git a/collects/tests/framework/text.ss b/collects/tests/framework/text.ss index a4ddc082..09671420 100644 --- a/collects/tests/framework/text.ss +++ b/collects/tests/framework/text.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)