You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

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:'