pablo-lamtenzan / miniShell

Implementing (most of) Bash from scracth, supports term-caps, expansion, job control and conditionals.
0 stars 0 forks source link

Separators #21

Closed pablo-lamtenzan closed 3 years ago

pablo-lamtenzan commented 3 years ago

Separators have problems with their return (i think i know why: it could be because i overwrite g_session.st)

See error log in 42sh_tester_issues.txt

And

$ ; ; exit 42

Must exit no 0 and no 42 value

pablo-lamtenzan commented 3 years ago

First of all i've found little problems in the error handling of invalid expressions using separators. In all the following expression the return value and the display are invalid.

$ ls ;; exit 42 $ || exit 42 $ && exit 42 $ ls ||| exit 42 $ ls &&& exit 42

pablo-lamtenzan commented 3 years ago

For the others issues:

1) In 42sh tester the error is minish doesn't return 21 (but it does)

$ ret 42 || ret 21 && ret 0

2) In 42sh tester the error is must display ls on stdout (but no, it havent')

$ true || false && ls

3) In 42sh tester the error is must display ls on stdout (but no, it haven't AND THE RETURN VALUE of minishell is 1 and bash's is 0 BUT the tester doesn't notified that...)

$ false && false || ls (have to check this one)

4) Same than before... There's error but when i test the result is the same...

$ false || true && true

5) And the same

$ true && true && true && true && false && true

So finally i can conclude there's only one issue of this 5

pablo-lamtenzan commented 3 years ago

Issue $ false && false || ls is solved