# HG changeset patch
# User ZyX <[email protected]>
# Date 1370101974 -14400
# Branch python-extended-4
# Node ID f37c4b0b09f688698e23d14c6f915968d0868523
# Parent  0921ff181087b318c2322ab5af06758776a59bd1
Fix platform-specific stuff in tests

diff -r 0921ff181087 -r f37c4b0b09f6 src/testdir/test86.in
--- a/src/testdir/test86.in     Fri May 31 08:40:24 2013 +0400
+++ b/src/testdir/test86.in     Sat Jun 01 19:52:54 2013 +0400
@@ -435,6 +435,7 @@
 :py bopts1=vim.buffers[vim.bindeval("g:bufs")[2]].options
 :py bopts2=vim.buffers[vim.bindeval("g:bufs")[1]].options
 :py bopts3=vim.buffers[vim.bindeval("g:bufs")[0]].options
+:set path=.,..,,
 :let lst=[]
 :let lst+=[['paste',          1,     0,     1,     2,      1,    1,      0    
]]
 :let lst+=[['previewheight',  5,     1,     6,     'a',    0,    1,      0    
]]
@@ -530,13 +531,14 @@
 b[0:0]=['baz']
 vim.command('call append("$", getbufline(%i, 1, "$"))' % b.number)
 # Test assigning to name property
+import os
 old_name = cb.name
 cb.name = 'foo'
-cb.append(cb.name[-11:])
+cb.append(cb.name[-11:].replace(os.path.sep, '/'))
 b.name = 'bar'
-cb.append(b.name[-11:])
+cb.append(b.name[-11:].replace(os.path.sep, '/'))
 cb.name = old_name
-cb.append(cb.name[-17:])
+cb.append(cb.name[-17:].replace(os.path.sep, '/'))
 # Test CheckBuffer
 for _b in vim.buffers:
     if _b is not cb:
diff -r 0921ff181087 -r f37c4b0b09f6 src/testdir/test86.ok
--- a/src/testdir/test86.ok     Fri May 31 08:40:24 2013 +0400
+++ b/src/testdir/test86.ok     Sat Jun 01 19:52:54 2013 +0400
@@ -310,7 +310,7 @@
   W: 1:0 2:1 3:0 4:1
   B: 1:0 2:1 3:0 4:1
 >>> path
-  p/gopts1: '.,/usr/include,,'
+  p/gopts1: '.,..,,'
   inv: 0! TypeError
   p/wopts1! KeyError
   inv: 0! KeyError
diff -r 0921ff181087 -r f37c4b0b09f6 src/testdir/test87.in
--- a/src/testdir/test87.in     Fri May 31 08:40:24 2013 +0400
+++ b/src/testdir/test87.in     Sat Jun 01 19:52:54 2013 +0400
@@ -404,6 +404,7 @@
 :py3 bopts1=vim.buffers[vim.bindeval("g:bufs")[2]].options
 :py3 bopts2=vim.buffers[vim.bindeval("g:bufs")[1]].options
 :py3 bopts3=vim.buffers[vim.bindeval("g:bufs")[0]].options
+:set path=.,..,,
 :let lst=[]
 :let lst+=[['paste',          1,     0,     1,     2,      1,    1,      0    
]]
 :let lst+=[['previewheight',  5,     1,     6,     'a',    0,    1,      0    
]]
@@ -499,13 +500,14 @@
 b[0:0]=['baz']
 vim.command('call append("$", getbufline(%i, 1, "$"))' % b.number)
 # Test assigning to name property
+import os
 old_name = cb.name
 cb.name = 'foo'
-cb.append(cb.name[-11:])
+cb.append(cb.name[-11:].replace(os.path.sep, '/'))
 b.name = 'bar'
-cb.append(b.name[-11:])
+cb.append(b.name[-11:].replace(os.path.sep, '/'))
 cb.name = old_name
-cb.append(cb.name[-17:])
+cb.append(cb.name[-17:].replace(os.path.sep, '/'))
 # Test CheckBuffer
 for _b in vim.buffers:
     if _b is not cb:
diff -r 0921ff181087 -r f37c4b0b09f6 src/testdir/test87.ok
--- a/src/testdir/test87.ok     Fri May 31 08:40:24 2013 +0400
+++ b/src/testdir/test87.ok     Sat Jun 01 19:52:54 2013 +0400
@@ -299,7 +299,7 @@
   W: 1:0 2:1 3:0 4:1
   B: 1:0 2:1 3:0 4:1
 >>> path
-  p/gopts1: b'.,/usr/include,,'
+  p/gopts1: b'.,..,,'
   inv: 0! TypeError
   p/wopts1! KeyError
   inv: 0! KeyError

-- 
-- 
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/groups/opt_out.


diff -cr vim.0921ff181087/src/testdir/test86.in vim.f37c4b0b09f6/src/testdir/test86.in
*** vim.0921ff181087/src/testdir/test86.in	2013-06-01 19:57:08.624821463 +0400
--- vim.f37c4b0b09f6/src/testdir/test86.in	2013-06-01 19:57:08.632821383 +0400
***************
*** 435,440 ****
--- 435,441 ----
  :py bopts1=vim.buffers[vim.bindeval("g:bufs")[2]].options
  :py bopts2=vim.buffers[vim.bindeval("g:bufs")[1]].options
  :py bopts3=vim.buffers[vim.bindeval("g:bufs")[0]].options
+ :set path=.,..,,
  :let lst=[]
  :let lst+=[['paste',          1,     0,     1,     2,      1,    1,      0    ]]
  :let lst+=[['previewheight',  5,     1,     6,     'a',    0,    1,      0    ]]
***************
*** 530,542 ****
  b[0:0]=['baz']
  vim.command('call append("$", getbufline(%i, 1, "$"))' % b.number)
  # Test assigning to name property
  old_name = cb.name
  cb.name = 'foo'
! cb.append(cb.name[-11:])
  b.name = 'bar'
! cb.append(b.name[-11:])
  cb.name = old_name
! cb.append(cb.name[-17:])
  # Test CheckBuffer
  for _b in vim.buffers:
      if _b is not cb:
--- 531,544 ----
  b[0:0]=['baz']
  vim.command('call append("$", getbufline(%i, 1, "$"))' % b.number)
  # Test assigning to name property
+ import os
  old_name = cb.name
  cb.name = 'foo'
! cb.append(cb.name[-11:].replace(os.path.sep, '/'))
  b.name = 'bar'
! cb.append(b.name[-11:].replace(os.path.sep, '/'))
  cb.name = old_name
! cb.append(cb.name[-17:].replace(os.path.sep, '/'))
  # Test CheckBuffer
  for _b in vim.buffers:
      if _b is not cb:
diff -cr vim.0921ff181087/src/testdir/test86.ok vim.f37c4b0b09f6/src/testdir/test86.ok
*** vim.0921ff181087/src/testdir/test86.ok	2013-06-01 19:57:08.620821503 +0400
--- vim.f37c4b0b09f6/src/testdir/test86.ok	2013-06-01 19:57:08.627821433 +0400
***************
*** 310,316 ****
    W: 1:0 2:1 3:0 4:1
    B: 1:0 2:1 3:0 4:1
  >>> path
!   p/gopts1: '.,/usr/include,,'
    inv: 0! TypeError
    p/wopts1! KeyError
    inv: 0! KeyError
--- 310,316 ----
    W: 1:0 2:1 3:0 4:1
    B: 1:0 2:1 3:0 4:1
  >>> path
!   p/gopts1: '.,..,,'
    inv: 0! TypeError
    p/wopts1! KeyError
    inv: 0! KeyError
diff -cr vim.0921ff181087/src/testdir/test87.in vim.f37c4b0b09f6/src/testdir/test87.in
*** vim.0921ff181087/src/testdir/test87.in	2013-06-01 19:57:08.621821494 +0400
--- vim.f37c4b0b09f6/src/testdir/test87.in	2013-06-01 19:57:08.628821423 +0400
***************
*** 404,409 ****
--- 404,410 ----
  :py3 bopts1=vim.buffers[vim.bindeval("g:bufs")[2]].options
  :py3 bopts2=vim.buffers[vim.bindeval("g:bufs")[1]].options
  :py3 bopts3=vim.buffers[vim.bindeval("g:bufs")[0]].options
+ :set path=.,..,,
  :let lst=[]
  :let lst+=[['paste',          1,     0,     1,     2,      1,    1,      0    ]]
  :let lst+=[['previewheight',  5,     1,     6,     'a',    0,    1,      0    ]]
***************
*** 499,511 ****
  b[0:0]=['baz']
  vim.command('call append("$", getbufline(%i, 1, "$"))' % b.number)
  # Test assigning to name property
  old_name = cb.name
  cb.name = 'foo'
! cb.append(cb.name[-11:])
  b.name = 'bar'
! cb.append(b.name[-11:])
  cb.name = old_name
! cb.append(cb.name[-17:])
  # Test CheckBuffer
  for _b in vim.buffers:
      if _b is not cb:
--- 500,513 ----
  b[0:0]=['baz']
  vim.command('call append("$", getbufline(%i, 1, "$"))' % b.number)
  # Test assigning to name property
+ import os
  old_name = cb.name
  cb.name = 'foo'
! cb.append(cb.name[-11:].replace(os.path.sep, '/'))
  b.name = 'bar'
! cb.append(b.name[-11:].replace(os.path.sep, '/'))
  cb.name = old_name
! cb.append(cb.name[-17:].replace(os.path.sep, '/'))
  # Test CheckBuffer
  for _b in vim.buffers:
      if _b is not cb:
diff -cr vim.0921ff181087/src/testdir/test87.ok vim.f37c4b0b09f6/src/testdir/test87.ok
*** vim.0921ff181087/src/testdir/test87.ok	2013-06-01 19:57:08.623821473 +0400
--- vim.f37c4b0b09f6/src/testdir/test87.ok	2013-06-01 19:57:08.629821413 +0400
***************
*** 299,305 ****
    W: 1:0 2:1 3:0 4:1
    B: 1:0 2:1 3:0 4:1
  >>> path
!   p/gopts1: b'.,/usr/include,,'
    inv: 0! TypeError
    p/wopts1! KeyError
    inv: 0! KeyError
--- 299,305 ----
    W: 1:0 2:1 3:0 4:1
    B: 1:0 2:1 3:0 4:1
  >>> path
!   p/gopts1: b'.,..,,'
    inv: 0! TypeError
    p/wopts1! KeyError
    inv: 0! KeyError

Raspunde prin e-mail lui