File: __driver__.lua

package info (click to toggle)
monotone 1.1-9
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 20,984 kB
  • ctags: 8,622
  • sloc: cpp: 86,450; sh: 6,906; perl: 924; makefile: 813; python: 517; lisp: 379; sql: 118; exp: 91; ansic: 52
file content (35 lines) | stat: -rw-r--r-- 1,002 bytes parent folder | download | duplicates (3)
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
27
28
29
30
31
32
33
34
35
--
-- test setting/clearing of the the execute file attribute works
--
skip_if(ostype=="Windows")

mtn_setup()

writefile("foo", "some data")
check(mtn("add", "foo"), 0, false, false)
commit()
without_x = base_revision()

check(mtn("attr", "set", "foo", "mtn:execute", "true"), 0, false, false)
check({"test", "-x","foo"}, 0, false, false)
commit()
with_x = base_revision()

check(mtn("update", "-r", without_x), 0, true, true)
check({"test", "!", "-x","foo"}, 0, false, false)

check(mtn("update", "-r", with_x), 0, false, false)
check({"test", "-x","foo"}, 0, false, false)

-- test checkout with mtn:execute

check(mtn("checkout", "checkout"), 0, false, false)
check(indir("checkout", {"test", "-x","foo"}, 0, false, false))

-- test clone with mtn:execute

copy("test.db", "test-clone.db")
test_uri="file://" .. url_encode_path(test.root .. "/test-clone.db") .. "?testbranch"

check(nodb_mtn("clone", test_uri, "clone"), 0, false, true)
check(indir("clone", {"test", "-x","foo"}, 0, false, false))