Fossil SCM
Add the test-echo command - useful for investigation the wildcard expansion behavior of shells.
Commit
cbf8782d562fb44058f5282fbd15b419e407ed89
Parent
8caf7e169164fdd…
1 file changed
+13
+13
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -1444,5 +1444,18 @@ | ||
| 1444 | 1444 | } |
| 1445 | 1445 | db_close(1); |
| 1446 | 1446 | win32_http_server(iPort, mxPort, zBrowserCmd, zStopperFile, zNotFound, flags); |
| 1447 | 1447 | #endif |
| 1448 | 1448 | } |
| 1449 | + | |
| 1450 | +/* | |
| 1451 | +** COMMAND: test-echo | |
| 1452 | +** | |
| 1453 | +** Echo all command-line arguments (enclosed in [...]) to the screen so that | |
| 1454 | +** wildcard expansion behavior of the host shell can be investigated. | |
| 1455 | +*/ | |
| 1456 | +void test_echo_cmd(void){ | |
| 1457 | + int i; | |
| 1458 | + for(i=0; i<g.argc; i++){ | |
| 1459 | + printf("argv[%d] = [%s]\n", i, g.argv[i]); | |
| 1460 | + } | |
| 1461 | +} | |
| 1449 | 1462 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -1444,5 +1444,18 @@ | |
| 1444 | } |
| 1445 | db_close(1); |
| 1446 | win32_http_server(iPort, mxPort, zBrowserCmd, zStopperFile, zNotFound, flags); |
| 1447 | #endif |
| 1448 | } |
| 1449 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -1444,5 +1444,18 @@ | |
| 1444 | } |
| 1445 | db_close(1); |
| 1446 | win32_http_server(iPort, mxPort, zBrowserCmd, zStopperFile, zNotFound, flags); |
| 1447 | #endif |
| 1448 | } |
| 1449 | |
| 1450 | /* |
| 1451 | ** COMMAND: test-echo |
| 1452 | ** |
| 1453 | ** Echo all command-line arguments (enclosed in [...]) to the screen so that |
| 1454 | ** wildcard expansion behavior of the host shell can be investigated. |
| 1455 | */ |
| 1456 | void test_echo_cmd(void){ |
| 1457 | int i; |
| 1458 | for(i=0; i<g.argc; i++){ |
| 1459 | printf("argv[%d] = [%s]\n", i, g.argv[i]); |
| 1460 | } |
| 1461 | } |
| 1462 |