(defun py-fill-paragraph-problems-lp:710373-test (&optional arg load-branch-function) (interactive "p") (when load-branch-function (funcall load-branch-function)) (py-fill-paragraph-problems-lp:710373-test-intern arg)) (defun py-fill-paragraph-problems-lp:710373-test-intern (&optional arg) "If no `load-branch-function' is specified, make sure the appropriate branch is loaded. Otherwise default python-mode will be checked. " (let ((tmp-dir "/tmp/") (fpp-exec-buffer "fill-paragraph-problems-lp:710373") (diff-buffer "fpp-lp:710373-old") (fpp-teststring " \"\"\" triple-quoted string containing \"quotation\" marks. triple-quoted string containing \"quotation\" marks. triple-quoted string containing \"quotation\" marks. triple-quoted string containing \"quotation\" marks. triple-quoted string containing \"quotation\" marks. \"\"\" ") erg) (set-buffer (get-buffer-create diff-buffer)) (erase-buffer) (insert fpp-teststring) (write-file (concat tmp-dir diff-buffer)) (if arg (progn (set-buffer (get-buffer-create fpp-exec-buffer)) (when arg (switch-to-buffer (current-buffer))) (erase-buffer) (py-fill-paragraph-problems-lp:710373-test-base)) (with-temp-buffer (py-fill-paragraph-problems-lp:710373-test-base))))) (defun py-fill-paragraph-problems-lp:710373-test-base () (python-mode) (insert fpp-teststring) (set-buffer fpp-exec-buffer) (font-lock-mode 1) (font-lock-fontify-buffer) (goto-char (point-min)) (forward-line 3) (message "I'm here: %s" (point)) (set-buffer-modified-p nil) ;; (describe-function 'py-fill-paragraph) (setq fill-column 55) (if (functionp 'py-fill-paragraph) (py-fill-paragraph) (python-fill-paragraph)) (write-file (concat tmp-dir fpp-exec-buffer)) (setq erg (diff (concat tmp-dir fpp-exec-buffer) (concat tmp-dir diff-buffer) "-u")) (if (featurep 'xemacs) (progn (set-buffer "*Diff Output*") (switch-to-buffer (current-buffer))) (set-buffer erg) (sit-for 1) (assert (numberp (progn (goto-char (point-min))(search-forward "no differences" nil t 1))) t) (message "%s" "py-fill-paragraph-problems-lp:710373 passed")))