summaryrefslogtreecommitdiff
path: root/test/clientlib
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2009-11-29 06:51:57 +0000
committerEric S. Raymond <esr@thyrsus.com>2009-11-29 06:51:57 +0000
commit0c7fe01a0b85d1645dc0906101c38b4718551b9d (patch)
treee24de2f21b2c2497b8d23718b6ff2d3abedee688 /test/clientlib
parent34c34d4438e50f29fbfcffe5c3c9ef1039d22d8a (diff)
downloadgpsd-0c7fe01a0b85d1645dc0906101c38b4718551b9d.tar.gz
Enable handling of multiple JSON objectts per line, and add a test for it.
Diffstat (limited to 'test/clientlib')
-rw-r--r--test/clientlib/multipacket.log2
-rw-r--r--test/clientlib/multipacket.log.chk4
-rw-r--r--test/clientlib/oldstyle.log.chk1
3 files changed, 7 insertions, 0 deletions
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)