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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
wendelin.core
Commits
a69c4b3e
Commit
a69c4b3e
authored
May 29, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
b74c7ca3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
wcfs/δbtail_test.go
wcfs/δbtail_test.go
+14
-1
No files found.
wcfs/δbtail_test.go
View file @
a69c4b3e
...
...
@@ -23,12 +23,14 @@ import (
"bufio"
"fmt"
"io"
"io/ioutil"
"os"
"os/exec"
"regexp"
"strings"
"testing"
"lab.nexedi.com/kirr/go123/exc"
"lab.nexedi.com/kirr/go123/xerr"
"lab.nexedi.com/kirr/neo/go/zodb"
)
...
...
@@ -51,6 +53,7 @@ type TreeGen struct {
func
StartTreeGen
(
zurl
string
)
(
_
*
TreeGen
,
err
error
)
{
defer
xerr
.
Contextf
(
&
err
,
"treegen %s: start"
,
zurl
)
// spawn `treegen trees`
tg
:=
&
TreeGen
{
zurl
:
zurl
}
tg
.
pysrv
=
exec
.
Command
(
"./testprog/treegen.py"
,
"trees"
)
tg
.
pysrv
.
Stdin
,
tg
.
pyin
=
io
.
Pipe
()
...
...
@@ -63,7 +66,6 @@ func StartTreeGen(zurl string) (_ *TreeGen, err error) {
return
nil
,
err
}
// wait for start message; initialize .head and .treeRoot from it
defer
func
()
{
if
err
!=
nil
{
...
...
@@ -149,6 +151,8 @@ func XXX(t *testing.T, tree1, tree2 string) {
}
func
TestΔBTail
(
t
*
testing
.
T
)
{
X
:=
exc
.
Raiseif
// XXX test known cases tree1 -> tree2
testv
:=
[]
struct
{
tree1
,
tree2
string
}
{
{
"T/B"
,
"T/B"
},
...
...
@@ -156,6 +160,15 @@ func TestΔBTail(t *testing.T) {
// XXX
}
work
,
err
:=
ioutil
.
TempDir
(
""
,
"δBTail"
);
X
(
err
)
defer
func
()
{
err
:=
os
.
RemoveAll
(
work
);
X
(
err
)
}()
tg
,
err
:=
StartTreeGen
(
work
+
"/1.fs"
);
X
(
err
)
defer
func
()
{
err
:=
tg
.
Close
();
X
(
err
)
}()
for
_
,
test
:=
range
testv
{
XXX
(
t
,
test
.
tree1
,
test
.
tree2
)
XXX
(
t
,
test
.
tree2
,
test
.
tree1
)
...
...
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