Loading ...
Sorry, an error occurred while loading the content.

fix tests for DOS/Windows

Expand Messages
  • Taro MURAOKA
    Hi list. There are tests failed on DOS/Windows environment. I have fixed two of them. Please check attached patches. test50: Short name seems depending on OS
    Message 1 of 11 , Jun 17, 2013
    View Source
    • 0 Attachment
      Hi list.


      There are tests failed on DOS/Windows environment.
      I have fixed two of them.
      Please check attached patches.


      test50: Short name seems depending on OS version.
      On my Win7, "c:/x.x.y" has short name "c:/XX9B80~1.Y", it will not be matched.
      So I made it flexible.


      test77: failed when "cksum" available (MinGW or Cygwin).


      Best.

      --
      --
      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 vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Ken Takata
      Hi, ... I have fixed another two of them. test71: (fix-test71.patch) * The fileformat of test71.in is unix, but dotest.in executes :set ff& . This makes
      Message 2 of 11 , Jun 18, 2013
      View Source
      • 0 Attachment
        Hi,

        2013/06/18 Tue 9:03:02 UTC+9 Taro MURAOKA wrote:
        > There are tests failed on DOS/Windows environment.
        > I have fixed two of them.

        I have fixed another two of them.

        test71: (fix-test71.patch)
        * The 'fileformat' of test71.in is unix, but dotest.in executes ':set ff&'.
        This makes :bwipe failure. It should be :bwipe!.
        * 'encoding' should be latin1.
        (I don't know why test71 doesn't fail on Unix without this setting.)


        test17: (fix-test17.patch)
        * mkdir on Windows doesn't support an option -p.
        * 'rm -rf' cannot be used on Windows without installing Unix tools.
        * The result of ':checkpath!' is different. Need to replace "\" to "/".
        * Some of ':e' should be ':e!' because 'fileformat' can be changed.

        Actually the last STARTTEST..ENDTEST block in the test17 still fails after
        applying fix-test17.patch. Here is the result:

        29c29,33
        < bar.c^M^@ NOT FOUND
        ---
        > Xdir1/dir2/bar.c
        > Xdir1/dir2/bar.c -->
        > Xdir1/dir2/baz.c
        > Xdir1/dir2/baz.c -->
        > foo.c^@ (Already listed)

        The difference of 'fileformat' seems to cause the result.
        This can be fixed by applying additional-fix-test17.patch,
        but I don't think this is the right solution.
        Is this behavior intended?

        Best regards,
        Ken Takata

        --
        --
        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 vim_dev+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
      • Bram Moolenaar
        ... Thanks. test50 fails on Unix though, I ll need to fix that. -- hundred-and-one symptoms of being an internet addict: 254. You wake up daily with your
        Message 3 of 11 , Jun 19, 2013
        View Source
        • 0 Attachment
          Taro Muraoka wrote:

          > There are tests failed on DOS/Windows environment.
          > I have fixed two of them.
          > Please check attached patches.
          >
          >
          > test50: Short name seems depending on OS version.
          > On my Win7, "c:/x.x.y" has short name "c:/XX9B80~1.Y", it will not be matched.
          > So I made it flexible.
          >
          > test77: failed when "cksum" available (MinGW or Cygwin).

          Thanks. test50 fails on Unix though, I'll need to fix that.


          --
          hundred-and-one symptoms of being an internet addict:
          254. You wake up daily with your keyboard printed on your forehead.

          /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
          /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
          \\\ an exciting new programming language -- http://www.Zimbu.org ///
          \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

          --
          --
          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 vim_dev+unsubscribe@....
          For more options, visit https://groups.google.com/groups/opt_out.
        • Bram Moolenaar
          ... Setting encoding make it fail on Unix. Note that the format of the test file is latin1 . What is the encoding by default? ... Thanks. ... I m not
          Message 4 of 11 , Jun 19, 2013
          View Source
          • 0 Attachment
            Ken Takata wrote:

            > 2013/06/18 Tue 9:03:02 UTC+9 Taro MURAOKA wrote:
            > > There are tests failed on DOS/Windows environment.
            > > I have fixed two of them.
            >
            > I have fixed another two of them.
            >
            > test71: (fix-test71.patch)
            > * The 'fileformat' of test71.in is unix, but dotest.in executes ':set ff&'.
            > This makes :bwipe failure. It should be :bwipe!.
            > * 'encoding' should be latin1.
            > (I don't know why test71 doesn't fail on Unix without this setting.)

            Setting 'encoding' make it fail on Unix. Note that the format of the
            test file is "latin1". What is the 'encoding' by default?

            > test17: (fix-test17.patch)
            > * mkdir on Windows doesn't support an option -p.
            > * 'rm -rf' cannot be used on Windows without installing Unix tools.
            > * The result of ':checkpath!' is different. Need to replace "\" to "/".
            > * Some of ':e' should be ':e!' because 'fileformat' can be changed.

            Thanks.

            > Actually the last STARTTEST..ENDTEST block in the test17 still fails after
            > applying fix-test17.patch. Here is the result:
            >
            > 29c29,33
            > < bar.c^M^@ NOT FOUND
            > ---
            > > Xdir1/dir2/bar.c
            > > Xdir1/dir2/bar.c -->
            > > Xdir1/dir2/baz.c
            > > Xdir1/dir2/baz.c -->
            > > foo.c^@ (Already listed)
            >
            > The difference of 'fileformat' seems to cause the result.
            > This can be fixed by applying additional-fix-test17.patch,
            > but I don't think this is the right solution.
            > Is this behavior intended?

            I'm not sure. It may also depend on what "diff" command you use.
            Some ignore differences in line endings, some don't.

            This test is not about testing 'fileformat', thus is those extra
            commands make the test pass, I think that's fine. I'm not going to
            include this change now, please resend if you still think this is the
            best solution.

            --
            Did you hear about the new 3 million dollar West Virginia State Lottery?
            The winner gets 3 dollars a year for a million years.

            /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
            /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
            \\\ an exciting new programming language -- http://www.Zimbu.org ///
            \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

            --
            --
            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 vim_dev+unsubscribe@....
            For more options, visit https://groups.google.com/groups/opt_out.
          • Dominique PellĂ©
            ... I m not sure if cksum behaves like md5sum, but for md5sum, it is necessary to use the -b flag (md5sum -b) to have the same md5 on Windows and Linux because
            Message 5 of 11 , Jun 19, 2013
            View Source
            • 0 Attachment
              Bram Moolenaar <Bram@...> wrote:
              >
              > Taro Muraoka wrote:
              >
              >> There are tests failed on DOS/Windows environment.
              >> I have fixed two of them.
              >> Please check attached patches.
              >>
              >>
              >> test50: Short name seems depending on OS version.
              >> On my Win7, "c:/x.x.y" has short name "c:/XX9B80~1.Y", it will not be matched.
              >> So I made it flexible.
              >>
              >> test77: failed when "cksum" available (MinGW or Cygwin).
              >
              > Thanks. test50 fails on Unix though, I'll need to fix that.

              I'm not sure if cksum behaves like md5sum, but
              for md5sum, it is necessary to use the -b flag (md5sum -b)
              to have the same md5 on Windows and Linux
              because by default, md5sum opens file in text mode
              which can give different results on Windows and on
              Linux. I don't see a -b option to cksum though in the
              man page on Linux though.

              Dominique

              --
              --
              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 vim_dev+unsubscribe@....
              For more options, visit https://groups.google.com/groups/opt_out.
            • Ken Takata
              Hi Bram, ... cp932 is the default encoding on my Windows. When I run the test71 step by step, I get the following error because cp932 is not compatible with
              Message 6 of 11 , Jun 19, 2013
              View Source
              • 0 Attachment
                Hi Bram,

                2013/06/20 Thu 4:17:48 UTC+9 Bram Moolenaar wrote:

                > Setting 'encoding' make it fail on Unix. Note that the format of the
                > test file is "latin1". What is the 'encoding' by default?

                'cp932' is the default encoding on my Windows.
                When I run the test71 step by step, I get the following error because
                cp932 is not compatible with latin1:

                "Xtestfile" E513: write error, conversion failed (make 'fenc' empty to override)

                Setting enc=latin1 and reloading test17.in seems to work both on Windows
                and Unix.

                Thanks,
                Ken Takata

                --
                --
                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 vim_dev+unsubscribe@....
                For more options, visit https://groups.google.com/groups/opt_out.
              • Ken Takata
                Hi Bram, ... No, it doesn t depend on the diff command. I have attached the result. (see: test17.failed) When the fileformat of Xdir1/dir2/*.c and Xbase.c is
                Message 7 of 11 , Jun 19, 2013
                View Source
                • 0 Attachment
                  Hi Bram,

                  2013/06/20 Thu 4:17:48 UTC+9 Bram Moolenaar wrote:

                  > > The difference of 'fileformat' seems to cause the result.
                  > > This can be fixed by applying additional-fix-test17.patch,
                  > > but I don't think this is the right solution.
                  > > Is this behavior intended?
                  >
                  > I'm not sure. It may also depend on what "diff" command you use.
                  > Some ignore differences in line endings, some don't.

                  No, it doesn't depend on the "diff" command.
                  I have attached the result. (see: test17.failed)
                  When the fileformat of Xdir1/dir2/*.c and Xbase.c is set to dos,
                  I get the same result even on Unix. (see: test17-set-ffdos-on-unix.diff)
                  Needs more investigation...

                  Thanks,
                  Ken Takata

                  --
                  --
                  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 vim_dev+unsubscribe@....
                  For more options, visit https://groups.google.com/groups/opt_out.
                • Bram Moolenaar
                  ... When I ran all tests it did pass. Don t know what went wrong the first time. Well, at first the test50 target was missing. -- hundred-and-one symptoms
                  Message 8 of 11 , Jun 20, 2013
                  View Source
                  • 0 Attachment
                    Dominique Pelle wrote:

                    > Bram Moolenaar <Bram@...> wrote:
                    > >
                    > > Taro Muraoka wrote:
                    > >
                    > >> There are tests failed on DOS/Windows environment.
                    > >> I have fixed two of them.
                    > >> Please check attached patches.
                    > >>
                    > >>
                    > >> test50: Short name seems depending on OS version.
                    > >> On my Win7, "c:/x.x.y" has short name "c:/XX9B80~1.Y", it will not be matched.
                    > >> So I made it flexible.
                    > >>
                    > >> test77: failed when "cksum" available (MinGW or Cygwin).
                    > >
                    > > Thanks. test50 fails on Unix though, I'll need to fix that.
                    >
                    > I'm not sure if cksum behaves like md5sum, but
                    > for md5sum, it is necessary to use the -b flag (md5sum -b)
                    > to have the same md5 on Windows and Linux
                    > because by default, md5sum opens file in text mode
                    > which can give different results on Windows and on
                    > Linux. I don't see a -b option to cksum though in the
                    > man page on Linux though.

                    When I ran all tests it did pass. Don't know what went wrong the first
                    time. Well, at first the "test50" target was missing.

                    --
                    hundred-and-one symptoms of being an internet addict:
                    257. Your "hundred-and-one" lists include well over 101 items, since you
                    automatically interpret all numbers in hexadecimal notation.
                    (hex 101 = decimal 257)

                    /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
                    /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
                    \\\ an exciting new programming language -- http://www.Zimbu.org ///
                    \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

                    --
                    --
                    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 vim_dev+unsubscribe@....
                    For more options, visit https://groups.google.com/groups/opt_out.
                  • Bram Moolenaar
                    ... When running the tests reloading is not an option. Perhaps explicitly setting fenc would work? -- hundred-and-one symptoms of being an internet addict:
                    Message 9 of 11 , Jun 20, 2013
                    View Source
                    • 0 Attachment
                      Ken takata wrote:

                      > 2013/06/20 Thu 4:17:48 UTC+9 Bram Moolenaar wrote:
                      >
                      > > Setting 'encoding' make it fail on Unix. Note that the format of the
                      > > test file is "latin1". What is the 'encoding' by default?
                      >
                      > 'cp932' is the default encoding on my Windows.
                      > When I run the test71 step by step, I get the following error because
                      > cp932 is not compatible with latin1:
                      >
                      > "Xtestfile" E513: write error, conversion failed (make 'fenc' empty to
                      > override)
                      >
                      > Setting enc=latin1 and reloading test17.in seems to work both on Windows
                      > and Unix.

                      When running the tests reloading is not an option.

                      Perhaps explicitly setting 'fenc' would work?

                      --
                      hundred-and-one symptoms of being an internet addict:
                      258. When you want to see your girlfriend, you surf to her homepage.

                      /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
                      /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
                      \\\ an exciting new programming language -- http://www.Zimbu.org ///
                      \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

                      --
                      --
                      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 vim_dev+unsubscribe@....
                      For more options, visit https://groups.google.com/groups/opt_out.
                    • Ken Takata
                      Hi Bram, ... No, it doesn t solve the problem. When Vim loads test17.in, the binary part is already broken, because the default value of encoding is cp932 on
                      Message 10 of 11 , Jul 1, 2013
                      View Source
                      • 0 Attachment
                        Hi Bram,

                        2013/06/20 The 16:03:03 UTC+9 Bram Moolenaar wrote:
                        > When running the tests reloading is not an option.
                        >
                        > Perhaps explicitly setting 'fenc' would work?

                        No, it doesn't solve the problem. When Vim loads test17.in,
                        the binary part is already broken, because the default value of
                        'encoding' is cp932 on my Windows environment.
                        To load the binary part properly:

                        1. 'enc' should be set to latin1 or utf-8.
                        2. After setting 'enc' properly, test17.in should be reloaded with
                        'fenc=latin1'. (E.g. use ':e ++enc=latin1')

                        If reloading is not allowed, the binary part should be a separate file.
                        Here is a patch.

                        Thanks,
                        Ken Takata

                        --
                        --
                        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 vim_dev+unsubscribe@....
                        For more options, visit https://groups.google.com/groups/opt_out.
                      • Bram Moolenaar
                        ... Thanks. I suppose there is no other way than to use a separate file. We should use latin1 encoding so that it works without the multi_byte feature. --
                        Message 11 of 11 , Jul 1, 2013
                        View Source
                        • 0 Attachment
                          Ken Takata wrote:

                          > 2013/06/20 The 16:03:03 UTC+9 Bram Moolenaar wrote:
                          > > When running the tests reloading is not an option.
                          > >
                          > > Perhaps explicitly setting 'fenc' would work?
                          >
                          > No, it doesn't solve the problem. When Vim loads test17.in,
                          > the binary part is already broken, because the default value of
                          > 'encoding' is cp932 on my Windows environment.
                          > To load the binary part properly:
                          >
                          > 1. 'enc' should be set to latin1 or utf-8.
                          > 2. After setting 'enc' properly, test17.in should be reloaded with
                          > 'fenc=latin1'. (E.g. use ':e ++enc=latin1')
                          >
                          > If reloading is not allowed, the binary part should be a separate file.
                          > Here is a patch.

                          Thanks. I suppose there is no other way than to use a separate file.

                          We should use "latin1" encoding so that it works without the multi_byte
                          feature.

                          --
                          With sufficient thrust, pigs fly just fine.
                          -- RFC 1925

                          /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
                          /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
                          \\\ an exciting new programming language -- http://www.Zimbu.org ///
                          \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

                          --
                          --
                          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 vim_dev+unsubscribe@....
                          For more options, visit https://groups.google.com/groups/opt_out.
                        Your message has been successfully submitted and would be delivered to recipients shortly.