From 8df3b4d5c1efc3867602ab23b196dc01aacdcbe2 Mon Sep 17 00:00:00 2001
From: Pawel Szewczyk
Date: Tue, 26 Aug 2014 12:24:59 +0200
Subject: [PATCH] gt: tests: Add gadget enable/disable commands parsing tests
Change-Id: I422e42e30fec9aeb019b6cb357a0165d647ac6d7
Signed-off-by: Pawel Szewczyk
---
source/test.bash | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/source/test.bash b/source/test.bash
index 0815609..56183a5 100755
--- a/source/test.bash
+++ b/source/test.bash
@@ -99,4 +99,25 @@ expect_failure "set gadget";
expect_failure "set gadget attr equals val";
expect_failure "set";
+expect_success "enable" "";
+expect_success "enable --gadget=gadget --udc=udc" "gadget=gadget, udc=udc";
+expect_success "enable --gadget=gadget1" "gadget=gadget1,";
+expect_success "enable --udc=udc1" "udc=udc1";
+expect_success "disable" "";
+expect_success "disable gadget1" "gadget=gadget1,";
+expect_success "disable --udc=udc1" "udc=udc1";
+
+expect_failure "disable gadget1 --udc=udc";
+expect_failure "enable -f";
+expect_failure "enable -v";
+expect_failure "enable -r";
+expect_failure "enable -o";
+expect_failure "disable gadget1 sth";
+expect_failure "disable gadget1 --gadget=gadget2";
+expect_failure "disable gadget1 -f";
+expect_failure "disable gadget1 -v";
+expect_failure "disable gadget1 -r";
+expect_failure "disable gadget1 -o";
+
+
echo "Testing finished, $SUCCESS_COUNT tests passed, $ERROR_COUNT failed.";
--
2.7.4