Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Joshua
wendelin.core
Commits
8538a5c1
Commit
8538a5c1
authored
Jul 02, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
abae5f95
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
6 deletions
+20
-6
wcfs/wcfs_test.py
wcfs/wcfs_test.py
+20
-6
No files found.
wcfs/wcfs_test.py
View file @
8538a5c1
...
...
@@ -1329,15 +1329,29 @@ def test_wcfs_basic_read_aftertail():
t
=
tDB
();
zf
=
t
.
zfile
defer
(
t
.
close
)
t
.
commit
(
zf
,
{
2
:
'c1'
}
t
.
commit
(
zf
,
{
2
:
'c1'
}
)
f
=
t
.
open
(
zf
)
f
.
assertData
([
''
,
''
,
'c1'
])
assert
10
==
io
.
readat
(
f
.
f
.
fileno
(),
0
*
blksize
,
bytearray
(
10
))
assert
10
==
io
.
readat
(
f
.
f
.
fileno
(),
1
*
blksize
,
bytearray
(
10
))
assert
10
==
io
.
readat
(
f
.
f
.
fileno
(),
2
*
blksize
,
bytearray
(
10
))
assert
0
==
io
.
readat
(
f
.
f
.
fileno
(),
3
*
blksize
,
bytearray
(
10
))
assert
0
==
io
.
readat
(
f
.
f
.
fileno
(),
100
*
blksize
,
bytearray
(
10
))
def
_
(
off
):
# -> bytes read from f[off +4)
buf
=
bytearray
(
4
)
n
=
io
.
readat
(
f
.
f
.
fileno
(),
off
,
buf
)
return
bytes
(
buf
[:
n
])
assert
_
(
0
*
blksize
)
==
b'
\
x00
\
x00
\
x00
\
x00
'
assert
_
(
1
*
blksize
)
==
b'
\
x00
\
x00
\
x00
\
x00
'
assert
_
(
2
*
blksize
)
==
b'c1
\
x00
\
x00
'
assert
_
(
3
*
blksize
-
4
)
==
b'
\
x00
\
x00
\
x00
\
x00
'
assert
_
(
3
*
blksize
-
3
)
==
b'
\
x00
\
x00
\
x00
'
assert
_
(
3
*
blksize
-
2
)
==
b'
\
x00
\
x00
'
assert
_
(
3
*
blksize
-
1
)
==
b'
\
x00
'
assert
_
(
3
*
blksize
-
0
)
==
b''
assert
_
(
3
*
blksize
+
1
)
==
b''
assert
_
(
3
*
blksize
+
2
)
==
b''
assert
_
(
3
*
blksize
+
3
)
==
b''
assert
_
(
4
*
blksize
)
==
b''
assert
_
(
8
*
blksize
)
==
b''
assert
_
(
100
*
blksize
)
==
b''
# verify that watch setup is robust to client errors/misbehaviour.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment