diff tests/automated/syntax-tests.el @ 973:ea6a06f7bf2c

[xemacs-hg @ 2002-08-22 14:56:23 by stephent] implement test skipping <87d6sblzat.fsf@tleepslib.sk.tsukuba.ac.jp>
author stephent
date Thu, 22 Aug 2002 14:56:32 +0000
parents 223736d75acb
children ccaf90c5a53a
line wrap: on
line diff
--- a/tests/automated/syntax-tests.el	Thu Aug 22 11:37:57 2002 +0000
+++ b/tests/automated/syntax-tests.el	Thu Aug 22 14:56:32 2002 +0000
@@ -127,16 +127,25 @@
 
 ;; Test forward-comment at buffer boundaries
 (with-temp-buffer
-  (c-mode)
-  (insert "// comment\n")
-  (forward-comment -2)
-  (Assert (eq (point) (point-min)))
+  (if (not (fboundp 'c-mode))
+      ;; #### This whole thing should go inside a macro Skip-Test
+      (let* ((reason "c-mode unavailable")
+	     (count (gethash reason skipped-test-reasons)))
+	;;(message "%S: %S" reason count)
+	(puthash reason (if (null count) 1 (1+ count))
+		 skipped-test-reasons)
+	(Print-Skip "comment and parse-partial-sexp tests" reason))
+    (c-mode)
+    
+    (insert "// comment\n")
+    (forward-comment -2)
+    (Assert (eq (point) (point-min)))
 
-  (let ((point (point)))
-	(insert "/* comment */")
-	(goto-char point)
-	(forward-comment 2)
-	(Assert (eq (point) (point-max)))
+    (let ((point (point)))
+      (insert "/* comment */")
+      (goto-char point)
+      (forward-comment 2)
+      (Assert (eq (point) (point-max)))
 
-	;; this last used to crash
-	(parse-partial-sexp point (point-max))))
+      ;; this last used to crash
+      (parse-partial-sexp point (point-max)))))