Re: [PATCH 2/3] test: Add `test_emacs_expect_t'.

2012-01-24 Thread Dmitry Kurochkin
On Thu, 19 Jan 2012 12:54:02 +, David Edmondson d...@dme.org wrote: Add a new test function to allow simpler testing of emacs functionality. `test_emacs_expect_t' takes one argument - a list expression to evaluate. The test passes if the expression returns `t', otherwise it fails and

[PATCH 2/3] test: Add `test_emacs_expect_t'.

2012-01-23 Thread Dmitry Kurochkin
On Thu, 19 Jan 2012 12:54:02 +, David Edmondson wrote: > Add a new test function to allow simpler testing of emacs > functionality. > > `test_emacs_expect_t' takes one argument - a list expression to > evaluate. The test passes if the expression returns `t', otherwise it > fails and the

[PATCH 2/3] test: Add `test_emacs_expect_t'.

2012-01-23 Thread David Edmondson
On Thu, 19 Jan 2012 12:54:02 +, David Edmondson wrote: > Add a new test function to allow simpler testing of emacs > functionality. > > `test_emacs_expect_t' takes one argument - a list expression to > evaluate. The test passes if the expression returns `t', otherwise it > fails and the

Re: [PATCH 2/3] test: Add `test_emacs_expect_t'.

2012-01-23 Thread David Edmondson
On Thu, 19 Jan 2012 12:54:02 +, David Edmondson d...@dme.org wrote: Add a new test function to allow simpler testing of emacs functionality. `test_emacs_expect_t' takes one argument - a list expression to evaluate. The test passes if the expression returns `t', otherwise it fails and

[PATCH 2/3] test: Add `test_emacs_expect_t'.

2012-01-19 Thread Tomi Ollila
On Thu, 19 Jan 2012 10:42:31 +, David Edmondson wrote: > On Thu, 19 Jan 2012 12:32:21 +0200, Tomi Ollila wrote: > > Consider the following: > > > > $ emacsclient --eval '(print "$(echo rm -rf /); echo `date +%Y`")' > > "$(echo rm -rf /); echo `date +%Y`" > > Or: > > $ emacsclient --eval

[PATCH 2/3] test: Add `test_emacs_expect_t'.

2012-01-19 Thread David Edmondson
Add a new test function to allow simpler testing of emacs functionality. `test_emacs_expect_t' takes one argument - a list expression to evaluate. The test passes if the expression returns `t', otherwise it fails and the output is reported to the tester. --- In the interest of moving forward,

[PATCH 2/3] test: Add `test_emacs_expect_t'.

2012-01-19 Thread Tomi Ollila
On Thu, 19 Jan 2012 09:59:16 +, David Edmondson wrote: > On Wed, 18 Jan 2012 16:55:59 +0200, Tomi Ollila wrote: > > > + # Report success/failure. > > > + if ! test_skip "$test_subtest_name" > > > + then > > > + if [ "$result" == t ] > > > > if [ "$result" = t ] > > > >

[PATCH 2/3] test: Add `test_emacs_expect_t'.

2012-01-19 Thread David Edmondson
On Thu, 19 Jan 2012 12:32:21 +0200, Tomi Ollila wrote: > Consider the following: > > $ emacsclient --eval '(print "$(echo rm -rf /); echo `date +%Y`")' > "$(echo rm -rf /); echo `date +%Y`" Or: $ emacsclient --eval '(shell-command "rm -rf /")' What's your point? -- next part

[PATCH 2/3] test: Add `test_emacs_expect_t'.

2012-01-19 Thread David Edmondson
On Wed, 18 Jan 2012 16:55:59 +0200, Tomi Ollila wrote: > > + # Report success/failure. > > + if ! test_skip "$test_subtest_name" > > + then > > + if [ "$result" == t ] > > if [ "$result" = t ] > > to be compatible with POSIX and consistent with rest code. I'm

Re: [PATCH 2/3] test: Add `test_emacs_expect_t'.

2012-01-19 Thread David Edmondson
On Wed, 18 Jan 2012 16:55:59 +0200, Tomi Ollila tomi.oll...@iki.fi wrote: + # Report success/failure. + if ! test_skip $test_subtest_name + then + if [ $result == t ] if [ $result = t ] to be compatible with POSIX and consistent with rest code. I'm

Re: [PATCH 2/3] test: Add `test_emacs_expect_t'.

2012-01-19 Thread Tomi Ollila
On Thu, 19 Jan 2012 09:59:16 +, David Edmondson d...@dme.org wrote: On Wed, 18 Jan 2012 16:55:59 +0200, Tomi Ollila tomi.oll...@iki.fi wrote: + # Report success/failure. + if ! test_skip $test_subtest_name + then + if [ $result == t ] if [ $result = t ]

Re: [PATCH 2/3] test: Add `test_emacs_expect_t'.

2012-01-19 Thread Tomi Ollila
On Thu, 19 Jan 2012 10:42:31 +, David Edmondson d...@dme.org wrote: On Thu, 19 Jan 2012 12:32:21 +0200, Tomi Ollila tomi.oll...@iki.fi wrote: Consider the following: $ emacsclient --eval '(print $(echo rm -rf /); echo `date +%Y`)' $(echo rm -rf /); echo `date +%Y` Or: $

[PATCH 2/3] test: Add `test_emacs_expect_t'.

2012-01-19 Thread David Edmondson
Add a new test function to allow simpler testing of emacs functionality. `test_emacs_expect_t' takes one argument - a list expression to evaluate. The test passes if the expression returns `t', otherwise it fails and the output is reported to the tester. --- In the interest of moving forward,

[PATCH 2/3] test: Add `test_emacs_expect_t'.

2012-01-18 Thread Tomi Ollila
On Tue, 17 Jan 2012 14:07:03 +, David Edmondson wrote: > Add a new test function to allow simpler testing of emacs > functionality. > > `test_emacs_expect_t' takes one argument - a list expression to > evaluate. The test passes if the expression returns `t', otherwise it > fails and the

[PATCH 2/3] test: Add `test_emacs_expect_t'.

2012-01-18 Thread Tomi Ollila
On Tue, 17 Jan 2012 15:09:22 +, David Edmondson wrote: > On Tue, 17 Jan 2012 18:49:36 +0400, Dmitry Kurochkin gmail.com> wrote: > > > + # We cannot call 'test_emacs' in a subshell, because > > > + # the setting of EMACS_SERVER would not persist > > > + # throughout a

Re: [PATCH 2/3] test: Add `test_emacs_expect_t'.

2012-01-18 Thread Tomi Ollila
On Tue, 17 Jan 2012 15:09:22 +, David Edmondson d...@dme.org wrote: On Tue, 17 Jan 2012 18:49:36 +0400, Dmitry Kurochkin dmitry.kuroch...@gmail.com wrote: + # We cannot call 'test_emacs' in a subshell, because + # the setting of EMACS_SERVER would not persist +

Re: [PATCH 2/3] test: Add `test_emacs_expect_t'.

2012-01-18 Thread Tomi Ollila
On Tue, 17 Jan 2012 14:07:03 +, David Edmondson d...@dme.org wrote: Add a new test function to allow simpler testing of emacs functionality. `test_emacs_expect_t' takes one argument - a list expression to evaluate. The test passes if the expression returns `t', otherwise it fails and

[PATCH 2/3] test: Add `test_emacs_expect_t'.

2012-01-17 Thread Dmitry Kurochkin
On Tue, 17 Jan 2012 14:35:07 +, David Edmondson wrote: > On Tue, 17 Jan 2012 18:26:41 +0400, Dmitry Kurochkin gmail.com> wrote: > > Sorry, I still do not understand why we can not implement > > test_emacs_expect_t() like: > > > > result=${test_emacs $@} > > test_expect_equal $result t >

[PATCH 2/3] test: Add `test_emacs_expect_t'.

2012-01-17 Thread Dmitry Kurochkin
On Tue, 17 Jan 2012 14:07:03 +, David Edmondson wrote: > Add a new test function to allow simpler testing of emacs > functionality. > > `test_emacs_expect_t' takes one argument - a list expression to > evaluate. The test passes if the expression returns `t', otherwise it > fails and the

[PATCH 2/3] test: Add `test_emacs_expect_t'.

2012-01-17 Thread David Edmondson
On Tue, 17 Jan 2012 18:49:36 +0400, Dmitry Kurochkin wrote: > > + # We cannot call 'test_emacs' in a subshell, because > > + # the setting of EMACS_SERVER would not persist > > + # throughout a sequence of tests, so we use a > > + # temporary file. > > +

[PATCH 2/3] test: Add `test_emacs_expect_t'.

2012-01-17 Thread David Edmondson
On Tue, 17 Jan 2012 18:26:41 +0400, Dmitry Kurochkin wrote: > Sorry, I still do not understand why we can not implement > test_emacs_expect_t() like: > > result=${test_emacs $@} > test_expect_equal $result t > > Can you please explain? In the failure case test_expect_equal does:

[PATCH 2/3] test: Add `test_emacs_expect_t'.

2012-01-17 Thread David Edmondson
Add a new test function to allow simpler testing of emacs functionality. `test_emacs_expect_t' takes one argument - a list expression to evaluate. The test passes if the expression returns `t', otherwise it fails and the output is reported to the tester. --- Re-worked as Dmitry suggested.

[PATCH 2/3] test: Add `test_emacs_expect_t'.

2012-01-17 Thread David Edmondson
Add a new test function to allow simpler testing of emacs functionality. `test_emacs_expect_t' takes one argument - a list expression to evaluate. The test passes if the expression returns `t', otherwise it fails and the output is reported to the tester. --- Re-worked as Dmitry suggested.

Re: [PATCH 2/3] test: Add `test_emacs_expect_t'.

2012-01-17 Thread Dmitry Kurochkin
On Tue, 17 Jan 2012 14:07:03 +, David Edmondson d...@dme.org wrote: Add a new test function to allow simpler testing of emacs functionality. `test_emacs_expect_t' takes one argument - a list expression to evaluate. The test passes if the expression returns `t', otherwise it fails and

Re: [PATCH 2/3] test: Add `test_emacs_expect_t'.

2012-01-17 Thread David Edmondson
On Tue, 17 Jan 2012 18:26:41 +0400, Dmitry Kurochkin dmitry.kuroch...@gmail.com wrote: Sorry, I still do not understand why we can not implement test_emacs_expect_t() like: result=${test_emacs $@} test_expect_equal $result t Can you please explain? In the failure case

Re: [PATCH 2/3] test: Add `test_emacs_expect_t'.

2012-01-17 Thread Dmitry Kurochkin
On Tue, 17 Jan 2012 14:35:07 +, David Edmondson d...@dme.org wrote: On Tue, 17 Jan 2012 18:26:41 +0400, Dmitry Kurochkin dmitry.kuroch...@gmail.com wrote: Sorry, I still do not understand why we can not implement test_emacs_expect_t() like: result=${test_emacs $@}

Re: [PATCH 2/3] test: Add `test_emacs_expect_t'.

2012-01-17 Thread David Edmondson
On Tue, 17 Jan 2012 18:49:36 +0400, Dmitry Kurochkin dmitry.kuroch...@gmail.com wrote: + # We cannot call 'test_emacs' in a subshell, because + # the setting of EMACS_SERVER would not persist + # throughout a sequence of tests, so we use a + #