[uim-commit] r1541 - in branches/0.4: scm test

yamaken at freedesktop.org yamaken at freedesktop.org
Fri Sep 23 01:35:54 PDT 2005


Author: yamaken
Date: 2005-09-23 01:35:51 -0700 (Fri, 23 Sep 2005)
New Revision: 1541

Modified:
   branches/0.4/scm/action.scm
   branches/0.4/test/test-action.scm
Log:
* scm/action.scm
* test/test-action.scm
  - Port r1540 from trunk


Modified: branches/0.4/scm/action.scm
===================================================================
--- branches/0.4/scm/action.scm	2005-09-23 08:32:52 UTC (rev 1540)
+++ branches/0.4/scm/action.scm	2005-09-23 08:35:51 UTC (rev 1541)
@@ -339,8 +339,8 @@
   (lambda (context)
     (let* ((widgets (context-widgets context))
 	   (active-label (lambda (widget)
-			   (let* ((activity (widget-activity widget))
-				  (indication (action-indicate activity
+			   (let* ((indicator (widget-indicator widget))
+				  (indication (action-indicate indicator
 							       context)))
 			     (indication-compose-label indication))))
 	   (labels (map active-label widgets))

Modified: branches/0.4/test/test-action.scm
===================================================================
--- branches/0.4/test/test-action.scm	2005-09-23 08:32:52 UTC (rev 1540)
+++ branches/0.4/test/test-action.scm	2005-09-23 08:35:51 UTC (rev 1541)
@@ -29,7 +29,7 @@
 ;;; SUCH DAMAGE.
 ;;;;
 
-;; This file is tested with revision 389 of new repository
+;; This file is tested with revision 1540 of new repository
 
 (use test.unit)
 
@@ -220,6 +220,13 @@
 			   fallback-indication))
 	  #f) ;; has no actions
 
+	 (register-widget
+	  'widget_test_kana_input_method_without_act_indicator
+	  (indicator-new (lambda (owner)
+			   fallback-indication))
+	  (actions-new '(action_test_roma
+			 action_test_kana)))
+
 	 (define tc (test-context-new))
 	 (begin (test-context-set-rkc! tc (rk-context-new ja-rk-rule #t #f))
 		#t)
@@ -1507,6 +1514,18 @@
    (assert-equal (string-append "ア\tカタカナ\n"
 				"R\tローマ字\n")
 		 (uim 'test-prop-label))
+   ;; 2 widgets (without latter activity-indicator)
+   (uim '(begin
+	   (context-init-widgets! tc '(widget_test_input_mode
+				       widget_test_kana_input_method_without_act_indicator))
+	   #t))
+   (assert-true (uim-bool '(widget-activate! (assq 'widget_test_input_mode
+						   (context-widgets tc))
+					     'action_test_katakana)))
+   (uim '(context-propagate-prop-label-update tc))
+   (assert-equal (string-append "ア\tカタカナ\n"
+				"?\tunknown\n")
+		 (uim 'test-prop-label))
    ;; 2 widgets with non-existent
    (uim '(begin
 	   (context-init-widgets! tc '(widget_test_kana_input_method



More information about the uim-commit mailing list