sim file parser and generator
The generator doesn't emit the best possible connect commands, but it does output something valid. Eg, an input like: connect A <-> B <-> C <-> D becomes: connect A <-> B <-> C connect C <-> D Also: connect A -> B <- C becomes: connect A -> B connect C -> B Which could be improved. Also disconnect commands are not prettified at all, but probably there's no reason to.
This commit is contained in:
parent
84bbbeae9d
commit
f381b457f2
4 changed files with 172 additions and 54 deletions
|
@ -29,7 +29,6 @@ seek _ = do
|
|||
let getpath = GetSimRepoPath $ \u -> tmpdir </> fromUUID u
|
||||
let st = emptySimState rng repobyname getpath
|
||||
st' <- runSimCommand (CommandInit (RepoName "foo")) st
|
||||
>>= runSimCommand (CommandTrustLevel (RepoName "foo") "trusted")
|
||||
>>= runSimCommand (CommandUse (RepoName "bar") "here")
|
||||
>>= runSimCommand (CommandConnect (RepoName "foo") (RemoteName "bar"))
|
||||
>>= runSimCommand (CommandConnect (RepoName "bar") (RemoteName "foo"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue