emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Regression tests and stderr


From: Sebastien Vauban
Subject: [O] Regression tests and stderr
Date: Thu, 01 Mar 2012 22:35:18 +0100
User-agent: Gnus/5.130004 (Ma Gnus v0.4) Emacs/24.0.92 (windows-nt)

Hello,

FYI, I just updated, and ran the tests, looking more carefully at the results
once again.

The trailer of what's displayed in the terminal is here:

--8<---------------cut here---------------start------------->8---
       passed  102/112  test-org/accumulated-properties-in-drawers
       passed  103/112  test-org/org-link-escape-ascii-character
       passed  104/112  test-org/org-link-escape-ascii-ctrl-character
       passed  105/112  test-org/org-link-escape-custom-table
       passed  106/112  test-org/org-link-escape-custom-table-merge
       passed  107/112  test-org/org-link-escape-multibyte-character
       passed  108/112  test-org/org-link-escape-url-with-escaped-char
       passed  109/112  test-org/org-link-unescape-ascii-character
       passed  110/112  test-org/org-link-unescape-ascii-ctrl-character
       passed  111/112  test-org/org-link-unescape-ascii-extended-char
       passed  112/112  test-org/org-link-unescape-multibyte-character

    Ran 112 tests, 111 results as expected, 1 unexpected (2012-03-01 
22:03:59+0100)
    11 expected failures

    1 unexpected results:
       FAILED  test-org-export/fuzzy-links
--8<---------------cut here---------------end--------------->8---

Pretty good. One failure, though, which I'll try to investigate (later on).

What's weird is the output that comes _after_ the above summary:

--8<---------------cut here---------------start------------->8---
    (a (quote 1))

    (a (quote 2))

    (it (quote 1))

    (it (quote 4))

    (results (quote (4 3 2 1)))

    [...]

    (bar (quote 2))

    (foo (quote 1))

    (bar (quote 2))
    address@hidden
--8<---------------cut here---------------end--------------->8---

Weird flushes, quite disturbing for analyzing the output of the tests.

I've discovered the same symptoms when using `print' or `princ' functions in
code that's run in batch mode. They come after calls to `message'.

What's even more annoying is that all the output of the testing -- but the
above trailer which comes after the test summary -- is sent to `/dev/stderr'.

What I tried to get is normal, informational messages, sent to `/dev/stdout',
and real errors (like test failures) sent to `/dev/stderr'.

Sadly, this seems to be a limit of Emacs itself:

   "In batch mode, Emacs does not display the text being edited, and the 
standard
    terminal interrupt characters such as C-z and C-c have their usual effect.
    Emacs functions that normally print a message in the echo area will print to
    either the standard output stream (stdout) or the standard error stream
    (stderr) instead. (To be precise, functions like prin1, princ and print 
print
    to stdout, while message and error print to stderr.) Functions that normally
    read keyboard input from the minibuffer take their input from the terminal's
    standard input stream (stdin) instead."

    
http://www.gnu.org/software/emacs/manual/html_node/emacs/Initial-Options.html

That's a pity, because it really limits (IMHO) the usage of such "script mode"
of Emacs. We can't afford rewriting all calls to `message' into calls to
`princ (format ...)'. Plus, doing so, moves messages in a non-chronological
way (like the "weird flushes" above).

Any workaround in sight?

Best regards,
  Seb

-- 
Sebastien Vauban




reply via email to

[Prev in Thread] Current Thread [Next in Thread]