Commit graph

340 commits

Author SHA1 Message Date
cae2dfe4d6
here_doc: basic setup 2025-03-11 14:58:13 +01:00
588faccf69
norm: fix small norm error 2025-03-11 14:58:13 +01:00
d196649106
redirection parsing: handle other types of redirection 2025-03-11 14:58:13 +01:00
47ac767f2a
redirection parsing: check for null in arguments 2025-03-11 14:58:13 +01:00
d9dfac106d
redirection parsing refactor: put redirection found actions in subroutine 2025-03-11 14:57:58 +01:00
5df876bba3
redirection parsing: detect malformed redirection 2025-03-10 16:57:02 +01:00
06dd3c3e83
redirection parings: handle redirections not at start 2025-03-10 16:34:15 +01:00
4116c2d92f
wordlist: add destroy_idx and pop_idx functions 2025-03-10 16:08:59 +01:00
ad5eb4cc34
wordlist: add a function to debug-print a wordlist 2025-03-10 15:10:18 +01:00
2a1660865d
redirection parsing: use redir_type_from_worddesc 2025-03-10 15:10:18 +01:00
e7946b4192
redirection parsing: add missing null check 2025-03-10 15:10:18 +01:00
b0439c9d7d
redirection parsing: get redirection type from worddesc 2025-03-10 15:10:18 +01:00
a20ea8315d
redirection parsing: handle > at start of wordlist 2025-03-10 15:10:18 +01:00
541bad80c0
redirection parsing: add utility functions for t_redir_list 2025-03-10 15:10:18 +01:00
b0c34f36ef
redirection parsing: add utility function for t_redirection 2025-03-10 15:10:18 +01:00
cf517bb7f8
redirection parsing: define types in own files 2025-03-10 15:10:18 +01:00
06ebcf132a
redirection parsing: handle commands with no redirections 2025-03-10 15:10:18 +01:00
42bccd0a06
fix: wrong check for malloc failure leads to failing tests 2025-03-10 15:07:13 +01:00
4fa56b45b6 cmdlist parse: fix issues reported by @Odroth 2025-03-10 13:22:29 +00:00
7595562597 norm: put cmdlist_builder functions in correct file 2025-03-10 13:22:29 +00:00
f3a38fb430 norm: remove print_backtrace 2025-03-10 13:22:29 +00:00
d30db395a0 cmdlist parsing: ensure parsing works for a single simple command 2025-03-10 13:22:29 +00:00
4c37ec5188 tests: put test back in a sensible order 2025-03-10 13:22:29 +00:00
e6a9010362 tests: make leak_check do nothing when compiled without LSAN 2025-03-10 13:22:29 +00:00
7102998dce leak: resolve the rest of the memory leaks 2025-03-10 13:22:29 +00:00
69b247697c leak: resolve one memory leak 2025-03-10 13:22:29 +00:00
5bf4bb8d6a tests: do lsan test after each test case 2025-03-10 13:22:29 +00:00
9ffde46adc tests: show test function in output 2025-03-10 13:22:29 +00:00
3778d0a7ee cmdlist_from_wordlist: make a copy of a wordlist 2025-03-10 13:22:29 +00:00
a79194de1a debug: remove *alloc/free debug information 2025-03-10 13:22:29 +00:00
14f7e523d3 debug: remove debug prints 2025-03-10 13:22:29 +00:00
4bc6c1ab20 fix(wordlist copy): copy did not work, like at all 2025-03-10 13:22:29 +00:00
5cd755b73c wip: make a copy of words in pipeline_from_wordlist 2025-03-10 13:22:29 +00:00
ccbd89708f tests: add simple reproducer for cmdlist use-after-free 2025-03-10 13:22:29 +00:00
d303f22b73 wip: tests: show more debug information 2025-03-10 13:22:29 +00:00
c57a4a69a7 WIP: parse command list tests: assert that invalid pipeline returns null 2025-03-10 13:22:29 +00:00
bccd68b11f command list refactor: put functions in correct file 2025-03-10 13:22:29 +00:00
d280839764 command list refactor: use a builder struct 2025-03-10 13:22:29 +00:00
5fceb4713d command list refactor: rename t_command_list to t_cmdlist 2025-03-10 13:22:29 +00:00
659c9f57ff command list parse: different operators 2025-03-10 13:22:29 +00:00
1c00020c86 command list parse: handle triple pipeline separated with || 2025-03-10 13:22:29 +00:00
e6dd1d6a56 command list parse: handle two commands separated by || 2025-03-10 13:22:29 +00:00
36fa53131a command list parse: handle single pipeline 2025-03-10 13:22:29 +00:00
3b36a77d34 command list parse: handle two commands separated by && 2025-03-10 13:22:29 +00:00
3b8b2c7a4a wordlist: add a function to debug-print a wordlist 2025-03-10 13:22:29 +00:00
eb21f00156 command list parsing: handle empty input
This is really not that usefull, it is more to setup the groundwork
2025-03-10 13:22:29 +00:00
1c653d9665
fix: potential pointer invalidation with ft_buffer 2025-03-09 14:40:19 +01:00
836e24bcb7
quote removal: ensure quotes in middle of word are correctly handled 2025-03-07 11:25:27 +01:00
94e55d1d8b
quote removal: handle nested quotes 2025-03-07 11:21:13 +01:00
a3d2143b8b
quote removal: handle non-nested quotes 2025-03-07 11:15:30 +01:00