Skip to content

Add "exists" builtin

Michael Aaron Murphy requested to merge BafDyce:builtin-exists into master

Created by: BafDyce

Problem: Implement the exists builtin mentioned in #409

Solution: I copied over the test builtin implementation, removed the stuff we don't need in exists and implemented the necessary new logic.

Changes introduced by this pull request:

  • Added exists builtin
  • Implemented the following flags: -a, -b, -d, -f, --fn, and -s
  • Implemented the STRING check
  • Implemented unit tests for all functions
  • Implemented integration tests

TODOs:

  • Maybe: binary_is_in_path should use the same logic as the one that is used to spawn new processes
  • test_binary_is_in_path could benefit from some more unit tests, however this requires a more complex/enhanced testing/-directory structure

Fixes: #409 (partly)

State: ready

Blocking/related: #409

Other:


The above template is not necessary for smaller PRs.

Merge request reports