Fossil SCM
In the test-fossil-system command, show the result code coming back from each command.
Commit
f6b67e157e53c42bb65dd3ded241922c78062fcd680cfcdf1f2e5ece7cd73402
Parent
a6477bca6540cde…
1 file changed
+3
-1
+3
-1
| --- src/util.c | ||
| +++ src/util.c | ||
| @@ -328,19 +328,21 @@ | ||
| 328 | 328 | void test_fossil_system_cmd(void){ |
| 329 | 329 | char zLine[10000]; |
| 330 | 330 | safeCmdStrTest = 1; |
| 331 | 331 | while(1){ |
| 332 | 332 | size_t n; |
| 333 | + int rc; | |
| 333 | 334 | printf("system-test> "); |
| 334 | 335 | fflush(stdout); |
| 335 | 336 | if( !fgets(zLine, sizeof(zLine), stdin) ) break; |
| 336 | 337 | n = strlen(zLine); |
| 337 | 338 | while( n>0 && fossil_isspace(zLine[n-1]) ) n--; |
| 338 | 339 | zLine[n] = 0; |
| 339 | 340 | printf("cmd: [%s]\n", zLine); |
| 340 | 341 | fflush(stdout); |
| 341 | - fossil_system(zLine); | |
| 342 | + rc = fossil_system(zLine); | |
| 343 | + printf("result: %d\n", rc); | |
| 342 | 344 | } |
| 343 | 345 | } |
| 344 | 346 | |
| 345 | 347 | /* |
| 346 | 348 | ** Like strcmp() except that it accepts NULL pointers. NULL sorts before |
| 347 | 349 |
| --- src/util.c | |
| +++ src/util.c | |
| @@ -328,19 +328,21 @@ | |
| 328 | void test_fossil_system_cmd(void){ |
| 329 | char zLine[10000]; |
| 330 | safeCmdStrTest = 1; |
| 331 | while(1){ |
| 332 | size_t n; |
| 333 | printf("system-test> "); |
| 334 | fflush(stdout); |
| 335 | if( !fgets(zLine, sizeof(zLine), stdin) ) break; |
| 336 | n = strlen(zLine); |
| 337 | while( n>0 && fossil_isspace(zLine[n-1]) ) n--; |
| 338 | zLine[n] = 0; |
| 339 | printf("cmd: [%s]\n", zLine); |
| 340 | fflush(stdout); |
| 341 | fossil_system(zLine); |
| 342 | } |
| 343 | } |
| 344 | |
| 345 | /* |
| 346 | ** Like strcmp() except that it accepts NULL pointers. NULL sorts before |
| 347 |
| --- src/util.c | |
| +++ src/util.c | |
| @@ -328,19 +328,21 @@ | |
| 328 | void test_fossil_system_cmd(void){ |
| 329 | char zLine[10000]; |
| 330 | safeCmdStrTest = 1; |
| 331 | while(1){ |
| 332 | size_t n; |
| 333 | int rc; |
| 334 | printf("system-test> "); |
| 335 | fflush(stdout); |
| 336 | if( !fgets(zLine, sizeof(zLine), stdin) ) break; |
| 337 | n = strlen(zLine); |
| 338 | while( n>0 && fossil_isspace(zLine[n-1]) ) n--; |
| 339 | zLine[n] = 0; |
| 340 | printf("cmd: [%s]\n", zLine); |
| 341 | fflush(stdout); |
| 342 | rc = fossil_system(zLine); |
| 343 | printf("result: %d\n", rc); |
| 344 | } |
| 345 | } |
| 346 | |
| 347 | /* |
| 348 | ** Like strcmp() except that it accepts NULL pointers. NULL sorts before |
| 349 |