Skip to content

Commit

Permalink
Fix an error of `url-generic-parse-url' on tests for Emacs21.
Browse files Browse the repository at this point in the history
* test/test-twittering-mode.el: Fix an error of
`url-generic-parse-url' on Emacs21 by calling
`url-scheme-get-property' before `url-generic-parse-url' is called.
  • Loading branch information
cvmat committed Jan 23, 2011
1 parent 8e73fa8 commit a648839
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
@@ -1,3 +1,9 @@
2011-01-23 Tadashi MATSUO <tad@mymail.twin.jp>

* test/test-twittering-mode.el: Fix an error of
`url-generic-parse-url' on Emacs21 by calling
`url-scheme-get-property' before `url-generic-parse-url' is called.

2011-01-21 Tadashi MATSUO <tad@mymail.twin.jp>

* twittering-mode.el: Decode received XML document as UTF-8 before
Expand Down
9 changes: 9 additions & 0 deletions test/test-twittering-mode.el
@@ -1,4 +1,13 @@

(when (and (> 22 emacs-major-version)
(require 'url-methods nil t))
;; `twittering-make-http-request-from-uri', which is called for the format
;; specifier "%i", requires `url-generic-parse-url'. But the function for
;; Emacs 21, which is distributed with twittering-mode, does not work
;; correctly until calling `url-scheme-get-property'.
(url-scheme-get-property "http" 'name)
(url-scheme-get-property "https" 'name))

(defcase test-version nil nil
(test-assert-string-match "^twittering-mode-v\\([0-9]+\\(\\.[0-9]+\\)*\\|HEAD\\)"
(twittering-mode-version)))
Expand Down

0 comments on commit a648839

Please sign in to comment.