|
|
@@ -307,15 +307,9 @@ class TestCmdline(object): |
|
|
|
|
|
|
|
# Match just one type or one path. Also check |
|
|
|
# that --path is optional |
|
|
|
self.ok("list --path /newton/raw") |
|
|
|
self.match("/newton/raw uint16_6\n") |
|
|
|
|
|
|
|
self.ok("list /newton/raw") |
|
|
|
self.match("/newton/raw uint16_6\n") |
|
|
|
|
|
|
|
self.fail("list -p /newton/raw /newton/raw") |
|
|
|
self.contain("too many paths") |
|
|
|
|
|
|
|
self.ok("list --layout uint16_6") |
|
|
|
self.match("/newton/raw uint16_6\n") |
|
|
|
|
|
|
@@ -324,15 +318,9 @@ class TestCmdline(object): |
|
|
|
self.match("/newton/raw uint16_6\n" |
|
|
|
"/newton/zzz/rawnotch uint16_9\n") |
|
|
|
|
|
|
|
self.ok("list --path *zzz* --layout uint16*") |
|
|
|
self.match("/newton/zzz/rawnotch uint16_9\n") |
|
|
|
|
|
|
|
self.ok("list *zzz* --layout uint16*") |
|
|
|
self.match("/newton/zzz/rawnotch uint16_9\n") |
|
|
|
|
|
|
|
self.ok("list --path *zzz* --layout float32*") |
|
|
|
self.match("") |
|
|
|
|
|
|
|
# reversed range |
|
|
|
self.fail("list /newton/prep --start 2020-01-01 --end 2000-01-01") |
|
|
|
self.contain("start must precede end") |
|
|
@@ -497,28 +485,28 @@ class TestCmdline(object): |
|
|
|
self.ok("list --detail") |
|
|
|
lines_(self.captured, 8) |
|
|
|
|
|
|
|
self.ok("list --detail --path *prep") |
|
|
|
self.ok("list --detail *prep") |
|
|
|
lines_(self.captured, 4) |
|
|
|
|
|
|
|
self.ok("list --detail --path *prep --start='23 Mar 2012 10:02'") |
|
|
|
self.ok("list --detail *prep --start='23 Mar 2012 10:02'") |
|
|
|
lines_(self.captured, 3) |
|
|
|
|
|
|
|
self.ok("list --detail --path *prep --start='23 Mar 2012 10:05'") |
|
|
|
self.ok("list --detail *prep --start='23 Mar 2012 10:05'") |
|
|
|
lines_(self.captured, 2) |
|
|
|
|
|
|
|
self.ok("list --detail --path *prep --start='23 Mar 2012 10:05:15'") |
|
|
|
self.ok("list --detail *prep --start='23 Mar 2012 10:05:15'") |
|
|
|
lines_(self.captured, 2) |
|
|
|
self.contain("10:05:15.000") |
|
|
|
|
|
|
|
self.ok("list --detail --path *prep --start='23 Mar 2012 10:05:15.50'") |
|
|
|
self.ok("list --detail *prep --start='23 Mar 2012 10:05:15.50'") |
|
|
|
lines_(self.captured, 2) |
|
|
|
self.contain("10:05:15.500") |
|
|
|
|
|
|
|
self.ok("list --detail --path *prep --start='23 Mar 2012 19:05:15.50'") |
|
|
|
self.ok("list --detail *prep --start='23 Mar 2012 19:05:15.50'") |
|
|
|
lines_(self.captured, 2) |
|
|
|
self.contain("no intervals") |
|
|
|
|
|
|
|
self.ok("list --detail --path *prep --start='23 Mar 2012 10:05:15.50'" |
|
|
|
self.ok("list --detail *prep --start='23 Mar 2012 10:05:15.50'" |
|
|
|
+ " --end='23 Mar 2012 10:05:15.51'") |
|
|
|
lines_(self.captured, 2) |
|
|
|
self.contain("10:05:15.500") |
|
|
@@ -527,15 +515,15 @@ class TestCmdline(object): |
|
|
|
lines_(self.captured, 8) |
|
|
|
|
|
|
|
# Verify the "raw timestamp" output |
|
|
|
self.ok("list --detail --path *prep --timestamp-raw " |
|
|
|
self.ok("list --detail *prep --timestamp-raw " |
|
|
|
"--start='23 Mar 2012 10:05:15.50'") |
|
|
|
lines_(self.captured, 2) |
|
|
|
self.contain("[ 1332497115500000 -> 1332497160000000 ]") |
|
|
|
|
|
|
|
# bad time |
|
|
|
self.fail("list --detail --path *prep -T --start='9332497115.612'") |
|
|
|
self.fail("list --detail *prep -T --start='9332497115.612'") |
|
|
|
# good time |
|
|
|
self.ok("list --detail --path *prep -T --start='1332497115.612'") |
|
|
|
self.ok("list --detail *prep -T --start='1332497115.612'") |
|
|
|
lines_(self.captured, 2) |
|
|
|
self.contain("[ 1332497115612000 -> 1332497160000000 ]") |
|
|
|
|
|
|
@@ -786,7 +774,7 @@ class TestCmdline(object): |
|
|
|
self.ok("list") |
|
|
|
self.contain(path) |
|
|
|
# Make sure it was created empty |
|
|
|
self.ok("list --detail --path " + path) |
|
|
|
self.ok("list --detail " + path) |
|
|
|
self.contain("(no intervals)") |
|
|
|
|
|
|
|
def test_12_unicode(self): |
|
|
|