xonsh/tests/procs
Andy Kipp c89a7267be
list_lines: list for single line output (#5478)
### Motivation

This is fix for introduced before
`$XONSH_SUBPROC_OUTPUT_FORMAT='list_lines'` so news file is not needed.

We should return the list for single line output to avoid unintended
reading the string.

### Before
```xsh
$XONSH_SUBPROC_OUTPUT_FORMAT='list_lines'
mkdir -p /tmp/list_lines
cd /tmp/list_lines
touch 123

du $(ls)
# 0	123

for f in $(ls):
    print(f)
# 1
# 2
# 3

touch 321

for f in $(ls):
    print(f)
# 123
# 321
```

### After

```xsh
$XONSH_SUBPROC_OUTPUT_FORMAT='list_lines'
mkdir -p /tmp/list_lines
cd /tmp/list_lines
touch 123

du $(ls)
# 0	123

for f in $(ls):
    print(f)
# 123

touch 321

for f in $(ls):
    print(f)
# 123
# 321
```


## For community
⬇️ **Please click the 👍 reaction instead of leaving a `+1` or 👍
comment**

Co-authored-by: a <1@1.1>
2024-06-02 16:33:34 +02:00
..
__init__.py Procs Initial Refactor (#3897) 2020-10-20 10:21:11 -04:00
test_specs.py list_lines: list for single line output (#5478) 2024-06-02 16:33:34 +02:00