Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Levin Zimmermann
neoppod
Commits
8d94d7f8
Commit
8d94d7f8
authored
7 years ago
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
44cb53de
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
t/neo/zodb/cmd/zodbdump/zodbdump_test.go
t/neo/zodb/cmd/zodbdump/zodbdump_test.go
+11
-3
No files found.
t/neo/zodb/cmd/zodbdump/zodbdump_test.go
View file @
8d94d7f8
...
...
@@ -12,9 +12,16 @@ import (
"../../../storage/fs1"
"../../../zodb"
"github.com/sergi/go-diff/diffmatchpatch"
"lab.nexedi.com/kirr/go123/exc"
)
func
diff
(
a
,
b
string
)
string
{
dmp
:=
diffmatchpatch
.
New
()
diffv
:=
dmp
.
DiffMain
(
a
,
b
,
/*checklines=*/
false
)
return
dmp
.
DiffPrettyText
(
diffv
)
}
func
TestZodbDump
(
t
*
testing
.
T
)
{
buf
:=
bytes
.
Buffer
{}
fs
,
err
:=
fs1
.
Open
(
"../../../storage/fs1/testdata/1.fs"
)
// XXX read-only, path?
...
...
@@ -29,12 +36,13 @@ func TestZodbDump(t *testing.T) {
t
.
Fatal
(
err
)
}
dumpOk
,
err
:=
ioutil
.
ReadFile
(
"testdata/1.zdump.ok"
)
__
,
err
:=
ioutil
.
ReadFile
(
"testdata/1.zdump.ok"
)
if
err
!=
nil
{
t
.
Fatal
(
err
)
}
dumpOk
:=
string
(
__
)
if
!
bytes
.
Equal
(
dumpOk
,
buf
.
Bytes
()
)
{
t
.
Errorf
(
"dump different
TODO show diff"
)
// XXX github.com/sergi/go-diff.git
if
dumpOk
!=
buf
.
String
(
)
{
t
.
Errorf
(
"dump different
:
\n
%v"
,
diff
(
dumpOk
,
buf
.
String
()))
}
}
This diff is collapsed.
Click to expand it.
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