Skip to content

Failed test bash -c "declare -x ISOLATED="15"; ctest --output-on-failure --tests-regex test-bopomofo --test-dir build" #600

@github-actions

Description

@github-actions

This issue is generated by Vulcan for commit: 890f3ec

Coverage: 55.60 percent

Click here for a list of target sources

src/chewingio.c

There is(are) 1/21 failed test(s)

Click here for the failed test commands
  1. [FAILED] bash -c "declare -x ISOLATED="15"; ctest --output-on-failure --tests-regex test-bopomofo --test-dir build"

Clicking on the link, you take the page with code highlighted.
There are a lot of the suspicious code snippets and show 5 among them.
Recommend that split your tests or adde new tests.

Click here for FL information

Suspicious score: 1.00


Suspicious score: 1.00

keystrokeRtn = KEYSTROKE_ABSORB | KEYSTROKE_BELL;


Suspicious score: 1.00

DEBUG_OUT(


Suspicious score: 1.00

switch ( key ) {


Suspicious score: 1.00


120 patch(es) generaetd by vulcan

plausible patch diff info
--- __backup0	2022-12-09 08:35:37.602477776 +0000
+++ src/chewingio.c	2022-12-09 08:54:57.416583289 +0000
@@ -1383,10 +1383,10 @@
 		 * and submit the words.
 		 */
 		int num = -1;
-		if ( key > 48 && key < 57 )
-			num = key - '1';
-		else if ( key == '0' )
-			num = 9;
+		if ((key > 48 && key < 57) || (key == 57))
+    num = key - '1';
+else if (key == '0')
+    num = 9;
 		DoSelect( pgdata, num );
 	}
 	CallPhrasing( pgdata, 0 );

--- __backup0	2022-12-09 08:35:37.602477776 +0000
+++ src/chewingio.c	2022-12-09 08:54:57.416583289 +0000
@@ -1383,10 +1383,10 @@
 		 * and submit the words.
 		 */
 		int num = -1;
-		if ( key > 48 && key < 57 )
-			num = key - '1';
-		else if ( key == '0' )
-			num = 9;
+		if ((key > 48 && key < 57) || (key != 48))
+    num = key - '1';
+else if (key == '0')
+    num = 9;
 		DoSelect( pgdata, num );
 	}
 	CallPhrasing( pgdata, 0 );

--- __backup0	2022-12-09 08:35:37.602477776 +0000
+++ src/chewingio.c	2022-12-09 08:54:57.416583289 +0000
@@ -1383,10 +1383,10 @@
 		 * and submit the words.
 		 */
 		int num = -1;
-		if ( key > 48 && key < 57 )
-			num = key - '1';
-		else if ( key == '0' )
-			num = 9;
+		if ((key > 48 && key < 57) || (key > 48))
+    num = key - '1';
+else if (key == '0')
+    num = 9;
 		DoSelect( pgdata, num );
 	}
 	CallPhrasing( pgdata, 0 );

--- __backup0	2022-12-09 08:35:37.602477776 +0000
+++ src/chewingio.c	2022-12-09 08:54:57.556587652 +0000
@@ -1383,10 +1383,10 @@
 		 * and submit the words.
 		 */
 		int num = -1;
-		if ( key > 48 && key < 57 )
-			num = key - '1';
-		else if ( key == '0' )
-			num = 9;
+		if (key > 48 && (key < 57 || (key == 57)))
+    num = key - '1';
+else if (key == '0')
+    num = 9;
 		DoSelect( pgdata, num );
 	}
 	CallPhrasing( pgdata, 0 );

--- __backup0	2022-12-09 08:35:37.602477776 +0000
+++ src/chewingio.c	2022-12-09 08:54:57.556587652 +0000
@@ -1383,10 +1383,10 @@
 		 * and submit the words.
 		 */
 		int num = -1;
-		if ( key > 48 && key < 57 )
-			num = key - '1';
-		else if ( key == '0' )
-			num = 9;
+		if (key > 48 && (key < 57 || (num == -1)))
+    num = key - '1';
+else if (key == '0')
+    num = 9;
 		DoSelect( pgdata, num );
 	}
 	CallPhrasing( pgdata, 0 );

--- __backup0	2022-12-09 08:35:37.602477776 +0000
+++ src/chewingio.c	2022-12-09 08:54:57.560587777 +0000
@@ -1383,10 +1383,10 @@
 		 * and submit the words.
 		 */
 		int num = -1;
-		if ( key > 48 && key < 57 )
-			num = key - '1';
-		else if ( key == '0' )
-			num = 9;
+		if (key > 48 && (key < 57 || (keystrokeRtn == 8)))
+    num = key - '1';
+else if (key == '0')
+    num = 9;
 		DoSelect( pgdata, num );
 	}
 	CallPhrasing( pgdata, 0 );

--- __backup0	2022-12-09 08:35:37.602477776 +0000
+++ src/chewingio.c	2022-12-09 08:54:57.560587777 +0000
@@ -1383,10 +1383,10 @@
 		 * and submit the words.
 		 */
 		int num = -1;
-		if ( key > 48 && key < 57 )
-			num = key - '1';
-		else if ( key == '0' )
-			num = 9;
+		if (key > 48 && (key < 57 || (QuickCommit == 0)))
+    num = key - '1';
+else if (key == '0')
+    num = 9;
 		DoSelect( pgdata, num );
 	}
 	CallPhrasing( pgdata, 0 );

--- __backup0	2022-12-09 08:35:37.602477776 +0000
+++ src/chewingio.c	2022-12-09 08:54:57.560587777 +0000
@@ -1383,10 +1383,10 @@
 		 * and submit the words.
 		 */
 		int num = -1;
-		if ( key > 48 && key < 57 )
-			num = key - '1';
-		else if ( key == '0' )
-			num = 9;
+		if (key > 48 && (key < 57 || (rtn == 1)))
+    num = key - '1';
+else if (key == '0')
+    num = 9;
 		DoSelect( pgdata, num );
 	}
 	CallPhrasing( pgdata, 0 );

--- __backup0	2022-12-09 08:35:37.602477776 +0000
+++ src/chewingio.c	2022-12-09 08:54:57.548587403 +0000
@@ -1383,10 +1383,10 @@
 		 * and submit the words.
 		 */
 		int num = -1;
-		if ( key > 48 && key < 57 )
-			num = key - '1';
-		else if ( key == '0' )
-			num = 9;
+		if (key > 48 && (key < 57 || (key != 0)))
+    num = key - '1';
+else if (key == '0')
+    num = 9;
 		DoSelect( pgdata, num );
 	}
 	CallPhrasing( pgdata, 0 );

--- __backup0	2022-12-09 08:35:37.602477776 +0000
+++ src/chewingio.c	2022-12-09 08:54:57.548587403 +0000
@@ -1383,10 +1383,10 @@
 		 * and submit the words.
 		 */
 		int num = -1;
-		if ( key > 48 && key < 57 )
-			num = key - '1';
-		else if ( key == '0' )
-			num = 9;
+		if (key > 48 && (key < 57 || (num != 0)))
+    num = key - '1';
+else if (key == '0')
+    num = 9;
 		DoSelect( pgdata, num );
 	}
 	CallPhrasing( pgdata, 0 );

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions