Skip to content

Commit 48fc49a

Browse files
authored
Add example for multiline test data using stdin redirect (#72)
1 parent 362af16 commit 48fc49a

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,17 @@ Download from [releases](https://github.com/dragfire/leetup/releases). Extract t
3030
- You need to login on leetcode.com first.
3131
- Copy `csrftoken` and `LEETCODE_SESSION` from cookie storage in the browser.
3232
- Pick a problem: `leetup pick -l python 1`
33-
- Test a problem: `leetup test two-sum.py -t "[1,2]\n3"`
33+
- Test a problem:
34+
`leetup test two-sum.py -t "[1,2]\n3"`
35+
or redirect test data using stdin
36+
```
37+
leetup test 3sum.java -t << END
38+
[1,-1,0]
39+
[0, 1, 1, 1, 2, -3, -1]
40+
[1,2,3]
41+
END
42+
```
43+
3444
- Submit a problem: `leetup submit two-sum.py`
3545
- List/Show problems: `leetup list`
3646
- Search by keyword: `leetup list <keyword>`

0 commit comments

Comments
 (0)