Improve the code coverage of the completion function 66/10866/3
Sylvestre Ledru [Sun, 17 Mar 2013 09:53:35 +0000 (10:53 +0100)]
Change-Id: I13e90105fcf70278192df7dada018060ab8e7931

scilab/modules/completion/tests/unit_tests/completion.dia.ref
scilab/modules/completion/tests/unit_tests/completion.tst

index 58343e5..9143214 100644 (file)
@@ -139,3 +139,8 @@ else
     [functions,commands,variables,macros,graphic_properties,files] = completion('/tm');
     assert_checkequal(files, ['tmp/']);
 end
+assert_checkerror("completion(2)",[], 999);
+assert_checkerror("completion([''aze'',''bze''])",[], 999);
+assert_checkerror("completion(''a'',''foo'')",[], 999);
+assert_checkerror("completion(''a'',2)",[], 999);
+assert_checkerror("[aazeaz,azeza,e,aze,azea,zazeaze,azeaze,azeze,aze,azeaz]=completion(""aaze"")",[],78);
index 9390caa..e5041a8 100644 (file)
@@ -191,5 +191,9 @@ else
     assert_checkequal(files, ['tmp/']);
 end
 
+assert_checkerror("completion(2)",[], 999);
 
-
+assert_checkerror("completion([''aze'',''bze''])",[], 999);
+assert_checkerror("completion(''a'',''foo'')",[], 999);
+assert_checkerror("completion(''a'',2)",[], 999);
+assert_checkerror("[aazeaz,azeza,e,aze,azea,zazeaze,azeaze,azeze,aze,azeaz]=completion(""aaze"")",[],78);