33 lines
342 B

  1. #!/bin/bash
  2. exname=$(basename $0)
  3. prefix_cmd="
  4. . /etc/shlib
  5. include common
  6. include parse
  7. . ../lib/common
  8. "
  9. try "echo '
  10. a: b
  11. ' | yaml_opt_bash_env PREFIX | tr '\0' ':'"
  12. noerror
  13. is out 'PREFIX_A:b:'
  14. try "echo '
  15. x: 1
  16. y:
  17. a: 4
  18. b: 3
  19. ' | yaml_opt_bash_env PREFIX | tr '\0' ':'"
  20. noerror
  21. is out 'PREFIX_X:1:PREFIX_Y_A:4:PREFIX_Y_B:3:'