1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
check(raw_mtn("ls", "workspaces"), 1, false, true)
check(qgrep("no database specified", "stderr"))
check(raw_mtn("db", "init", "-d", "test.mtn"), 0, false, false)
check(raw_mtn("ls", "workspaces", "-d", "test.mtn"), 0, true, false)
check(samelines("stdout", {"no known valid workspaces"}))
check(raw_mtn("setup", "-d", "test.mtn", "-b", "test.branch1", "work1"), 0, false, false)
check(raw_mtn("ls", "workspaces", "-d", "test.mtn"), 0, true, false)
check(qgrep("test.branch1.+in.+list_workspaces/work1", "stdout"))
check(raw_mtn("setup", "-d", "test.mtn", "-b", "test.branch2", "work2"), 0, false, false)
check(rename("work1", "work3"))
check(raw_mtn("ls", "workspaces", "-d", "test.mtn"), 0, true, false)
check(qgrep("test.branch2.+in.+list_workspaces/work2", "stdout"))
check(not qgrep("test.branch1.+in.+list_workspaces/work1", "stdout"))
check(indir("work3", raw_mtn("register_workspace", "-d", "../test.mtn")), 0, false, false)
check(raw_mtn("ls", "workspaces", "-d", "test.mtn"), 0, true, false)
check(qgrep("test.branch1.+in.+list_workspaces/work3", "stdout"))
|