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 (16 lines) | stat: -rw-r--r-- 586 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

mtn_setup()

-- Invoking a command with an unknown subcommand shows the correct error.
check(mtn("list", "foobar"), 1, "", true)
output = readfile("stderr")
check(string.find(output, "could not match 'foobar'") ~= nil)
check(string.find(output, "to a subcommand of 'list'") ~= nil)

-- Invoking a command with a missing subcommand shows the correct error.
check(mtn("list"), 1, "", true)
output = readfile("stderr")
check(string.find(output, "no subcommand specified for 'list'") ~= nil)

-- Invoking a command with a correct subcommand works.
check(mtn("list", "keys"), 0, false, "")