From 1cf2c568c9a8d3a515254036916219d1b12de4d0 Mon Sep 17 00:00:00 2001
From: Jan Breuer <jan.breuer@jaybee.cz>
Date: 周二, 13 10月 2015 00:49:16 +0800
Subject: [PATCH] Resolve #57: SCPI_ExprChannelListEntry() crashes with whitespaces

---
 libscpi/test/test_parser.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/libscpi/test/test_parser.c b/libscpi/test/test_parser.c
index f810699..2602bd5 100644
--- a/libscpi/test/test_parser.c
+++ b/libscpi/test/test_parser.c
@@ -760,6 +760,9 @@
     TEST_ChannelList("(@1,2!5:3!6!7)", 0, 2, FALSE, 1, (1), (0), SCPI_EXPR_OK, 0);
     TEST_ChannelList("(@1,2!5:3!6!7)", 1, 2, FALSE, 0, (0), (0), SCPI_EXPR_ERROR, SCPI_ERROR_EXPRESSION_PARSING_ERROR);
     TEST_ChannelList("(@1,2!5:3!6!7)", 2, 2, FALSE, 0, (0), (0), SCPI_EXPR_ERROR, SCPI_ERROR_EXPRESSION_PARSING_ERROR);
+
+    TEST_ChannelList("(@1, 2)", 0, 1, FALSE, 1, (1), (0), SCPI_EXPR_OK, 0);
+    TEST_ChannelList("(@1, 2)", 1, 1, FALSE, 0, (0), (0), SCPI_EXPR_ERROR, SCPI_ERROR_EXPRESSION_PARSING_ERROR);
 }
 
 int main() {

--
Gitblit v1.9.1