2015-12-07 1:35 GMT+03:00 Michael Soyka <[email protected]>:

> On 12/6/2015 4:41 PM, Bram Moolenaar wrote:
>
>> Michael Soyka wrote:
>>
>> On 12/5/2015 1:47 PM, Bram Moolenaar wrote:
>>>
>>>> Michael Soyka wrote:
>>>>
>>>> On 12/4/2015 5:27 PM, Bram Moolenaar wrote:
>>>>>
>>>>>> Michael Soyka wrote:
>>>>>>
>>>>>> On 12/3/2015 4:13 PM, Bram Moolenaar wrote:
>>>>>>>
>>>>>>>> I have added "new style" testing for Unix.  It appears to work
>>>>>>>> well, so
>>>>>>>> now we also need this for other platforms.  The Unix Makefile only
>>>>>>>> needed a few extra lines, hopefully it's also simple for others.
>>>>>>>>
>>>>>>>> I would prefer someone who knows the platform to make a patch for
>>>>>>>> this.
>>>>>>>> We need this for:
>>>>>>>>         src/testdir/Make_dos.mak
>>>>>>>>             src/testdir/Make_ming.mak
>>>>>>>>
>>>>>>>> And if someone still has one of these systems:
>>>>>>>>         src/testdir/Make_amiga.mak
>>>>>>>>         src/testdir/Make_os2.mak
>>>>>>>>             src/testdir/Make_vms.mms
>>>>>>>>
>>>>>>>> Bram,
>>>>>>>
>>>>>>> Since I've been dabbling in things ming lately, I'm willing to give
>>>>>>> it
>>>>>>> shot.  What information do I need?
>>>>>>>
>>>>>> Look in src/testdir/Makefile for how "newtests" is defined.
>>>>>> I assume that the MingW make works pretty much like the Unix one.
>>>>>>
>>>>>> Bram,
>>>>>
>>>>> I've updated the mingw makefile using your changes to the unix makefile
>>>>> as a guide.  I've attached the complete modified file and show the
>>>>> diffs
>>>>> below.
>>>>>
>>>> Nice, thanks.
>>>>
>>>> I ran the newtests using gvim and both tests passed.  However, a popup
>>>>> window with an OK button is displayed at the conclusion of each test.
>>>>> This happens whether the test passes or fails.  The tester must press
>>>>> the OK button to continue to the next test.  Is this desirable?  By the
>>>>> way, the popup looks like one put up by the confirm function.
>>>>>
>>>> There should be no popup window.  Please find a way to avoid it.
>>>> I could not reproduce this on Linux when testing with gvim.
>>>>
>>>> Because of the popups, I've added an if-test at the end of the makefile
>>>>> to display the test status in the terminal window.
>>>>>
>>>>> I added the "newtests" targets to all the test targets in the makefile-
>>>>> gui, nongui, and the others.  In effect, I've made the assumption that
>>>>> the new tests will never be intended for gvim testing exclusively.  If
>>>>> this is not correct, changes are in order.
>>>>>
>>>> The tests should run together with the "old" tests.
>>>>
>>>> Just to be clear, I'm using mingw under Windows.
>>>>>
>>>>> Thanks for the opportunity to help,
>>>>>
>>>> Thanks for looking into this!
>>>>
>>>> Bram, et al,
>>>
>>> Here are my thoughts regarding the popup windows I see when running your
>>> newtests.  The explanation is pure guesswork on my part as I am
>>> certainly not familiar with the mysterious ways of Windows.  Perhaps
>>> someone more knowledgeable can comment.
>>>
>>> First of all, what is displayed in the popups are informational
>>> messages, some of which come from "redir", "split" and "write"
>>> ex-commands.  I can make them go away by prefixing the commands with
>>> "silent" or, in the case of redir, putting them in a function and
>>> calling it with the silent prefix as recommended by the docs.  For the
>>> "test_assert.vim" test, the popup window will no longer appear if I do
>>> all of the above and remove the final test summary message echoed at the
>>> end of runtest.vim.
>>>
>>> I'm going to conjecture that these popup windows are created because
>>> gvim has not yet created a window in which those messages would be
>>> displayed.  The docs say that "-u" options are processed before gui
>>> initializations and before the gui opens any windows and the newtests
>>> are run as part of the -u option processing.  I understand that the unix
>>> behavior contradicts this guess...
>>>
>>> By the way, if I launch gvim with a -V option, say -V9, a similar popup
>>> window is displayed in which the early verbose messages appear.
>>> Subsequent verbose messages show-up in the desktop window.
>>>
>>> I think I've gone as far as I can unless someone can make a suggestion.
>>>
>>> Mike
>>>
>>> For clarity, here's how I modified runtest.vim to eliminate the popup
>>> for test_asset.vim:
>>>
>> I see, it happens because on Windows gvim doesn't have stdout and
>> stderr, so messages are collected and displayed in the popup.
>>
>> Instead of running the script with -u, it probably works with:
>>         -C "so runtest.vim"
>>
>> Perhaps there is more output that should be written to a file instead of
>> stdout/stderr?
>>
>>
> Your suggestion (but using -c instead of -C) does eliminate the popups and
> the tests run successfully.  .
>

​Since this is true it is better to replace `-c 'so …'` with `-S …`.
Internally these are identical calls (including that `-S 'runtest.vim |
echo "foo"'`​ will echo `foo`).



>
> Good job!  Thanks,
>
> Mike
>
>
> --
> --
> You received this message from the "vim_dev" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> --- You received this message because you are subscribed to the Google
> Groups "vim_dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui