@@ -48,7 +48,7 @@ bashunit test tests/ --parallel --simple
4848| ` -a, --assert <fn> <args> ` | Run a standalone assert function |
4949| ` -e, --env, --boot <file> ` | Load custom env/bootstrap file |
5050| ` -f, --filter <name> ` | Only run tests matching name |
51- | ` -l, - -log-junit <file> ` | Write JUnit XML report |
51+ | ` --log-junit <file> ` | Write JUnit XML report |
5252| ` -p, --parallel ` | Run tests in parallel (default) |
5353| ` --no-parallel ` | Run tests sequentially |
5454| ` -r, --report-html <file> ` | Write HTML report |
@@ -63,6 +63,7 @@ bashunit test tests/ --parallel --simple
6363| ` --no-output ` | Suppress all output |
6464| ` --strict ` | Enable strict shell mode |
6565| ` --preserve-env ` | Skip ` .env ` loading, use shell environment only |
66+ | ` -l, --login ` | Run tests in login shell context |
6667
6768### Standalone Assert
6869
@@ -216,6 +217,29 @@ BASHUNIT_SIMPLE_OUTPUT=true ./bashunit test tests/ --preserve-env
216217```
217218:::
218219
220+ ### Login Shell
221+
222+ > ` bashunit test -l|--login `
223+
224+ Run tests in a login shell context by sourcing profile files.
225+
226+ When enabled, bashunit sources the following files (if they exist) before each test:
227+ - ` /etc/profile `
228+ - ` ~/.bash_profile `
229+ - ` ~/.bash_login `
230+ - ` ~/.profile `
231+
232+ Use this when your tests depend on environment setup from login shell profiles, such as:
233+ - PATH modifications
234+ - Shell functions defined in ` .bash_profile `
235+ - Environment variables set during login
236+
237+ ::: code-group
238+ ``` bash [Example]
239+ bashunit test tests/ --login
240+ ```
241+ :::
242+
219243## bench
220244
221245> ` bashunit bench [path] [options] `
@@ -244,6 +268,8 @@ bashunit bench --filter "parse"
244268| ` -s, --simple ` | Simple output |
245269| ` --detailed ` | Detailed output (default) |
246270| ` -vvv, --verbose ` | Show execution details |
271+ | ` --preserve-env ` | Skip ` .env ` loading, use shell environment only |
272+ | ` -l, --login ` | Run in login shell context |
247273
248274## doc
249275
0 commit comments