1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
mtn_setup()
addfile("testfile", "foo bar")
check(mtn("attr", "set", "testfile", "test:first_key", "first_value"), 0, false, false)
check(mtn("attr", "set", "testfile", "test:second_key", "second_value"), 0, false, false)
check(mtn("attr", "get", "testfile"), 0, true, false)
check(qgrep("test:first_key", "stdout"))
check(qgrep("first_value", "stdout"))
check(qgrep("test:second_key", "stdout"))
check(qgrep("second_value", "stdout"))
check(mtn("attr", "drop", "testfile", "test:first_key"), 0, true, false)
check(mtn("attr", "get", "testfile"), 0, true, false)
check(not qgrep("test:first_key", "stdout"))
check(not qgrep("first_value", "stdout"))
check(qgrep("test:second_key", "stdout"))
check(qgrep("second_value", "stdout"))
check(mtn("attr", "drop", "testfile"), 0, true, false)
check(mtn("attr", "get", "testfile"), 0, true, false)
check(not qgrep("test:first_key", "stdout"))
check(not qgrep("first_value", "stdout"))
check(not qgrep("test:second_key", "stdout"))
check(not qgrep("second_value", "stdout"))
|