From 0c7fe01a0b85d1645dc0906101c38b4718551b9d Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sun, 29 Nov 2009 06:51:57 +0000 Subject: Enable handling of multiple JSON objectts per line, and add a test for it. --- test/clientlib/multipacket.log | 2 ++ test/clientlib/multipacket.log.chk | 4 ++++ test/clientlib/oldstyle.log.chk | 1 + 3 files changed, 7 insertions(+) create mode 100644 test/clientlib/multipacket.log create mode 100644 test/clientlib/multipacket.log.chk (limited to 'test/clientlib') diff --git a/test/clientlib/multipacket.log b/test/clientlib/multipacket.log new file mode 100644 index 00000000..190eee48 --- /dev/null +++ b/test/clientlib/multipacket.log @@ -0,0 +1,2 @@ +# Test the ability to parse multiple packets on the same line +{"class":"VERSION","release":"2.90dev","rev":"svn6614","proto_major":3,"proto_minor":1}{"class":"DEVICES","devices":[{"class":"DEVICE","path":"/dev/ttyS0","activated":1259438908.99,"flags":1,"driver":"SiRF binary","native":1,"bps":4800,"parity":"N","stopbits":1,"cycle":1.00}]}{"class":"WATCH","enable":true,"nmea":false,"raw":0,"scaled":false,"timing":false} diff --git a/test/clientlib/multipacket.log.chk b/test/clientlib/multipacket.log.chk new file mode 100644 index 00000000..a2d2d4e1 --- /dev/null +++ b/test/clientlib/multipacket.log.chk @@ -0,0 +1,4 @@ +flags: (0x808000) {POLICY|DEVICELIST} +POLICY: watcher=true nmea=false raw=0 scaled=false timing=false, devpath= +DEVICELIST:1 devices: +1: path='/dev/ttyS0' driver='SiRF binary' diff --git a/test/clientlib/oldstyle.log.chk b/test/clientlib/oldstyle.log.chk index 60cd0396..69546bd3 100644 --- a/test/clientlib/oldstyle.log.chk +++ b/test/clientlib/oldstyle.log.chk @@ -6,3 +6,4 @@ SPEED: 24.899000 TRACK: track: 70.890000 CLIMB: climb: 0.000000 STATUS: status: 1 (FIX) +MODE: mode: 537598 (MODE_3D) -- cgit v1.2.1