You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This command links the installed package to your local source code, so any changes you make are immediately effective.
27
40
28
41
## Using the Client
29
42
@@ -86,3 +99,37 @@ Or (on platforms that support it) use hypercorn:
86
99
```bash
87
100
hypercorn tanco.app:app # --reload
88
101
```
102
+
103
+
## Local Usage
104
+
105
+
Tanco is primarily used via its command-line interface.
106
+
107
+
**Running Local Tests from Org Files:**
108
+
109
+
Tanco can now run tests defined directly within an `.org` file, independent of the server. This is useful for local development, testing, and creating new challenges.
110
+
111
+
Use the `run` command with the `--tests` flag:
112
+
113
+
```bash
114
+
tanco run --tests path/to/your/tests.org [program_and_args...]
115
+
```
116
+
117
+
*`--tests path/to/your/tests.org`: Specifies the org file containing the test definitions (using `#+name:`, `#+begin_src`, etc.).
118
+
*`[program_and_args...]`: The command and arguments needed to execute the program being tested.
119
+
* If your program needs to be run via the shell (e.g., using interpreters like `node` or `python`), prefix the command with `-c`. For example:
120
+
```bash
121
+
tanco run --tests tests.org -c 'node your_script.js'
122
+
tanco run --tests tests.org -c 'python your_script.py arg1'
123
+
```
124
+
* If your program is a direct executable (like `myprogram.exe` on Windows or `./myprogram` on Linux), just provide the path and arguments:
125
+
```bash
126
+
tanco run --tests tests.org path/to/your_program arg1 arg2
127
+
```
128
+
129
+
**Verbose Output:**
130
+
131
+
You can add the `-v` or `--verbose` flag to the `run`command to print the configuration Tanco is using before executing the tests. This is helpful for debugging paths and arguments:
0 commit comments