3
0

func_bash1.tests 301 B

12345678910111213141516171819202122232425262728
  1. function f() { echo $1; }
  2. f 1
  3. function f() ( echo $1; )
  4. f 2
  5. function f() ( echo $1 )
  6. f 3
  7. function f() for i in 1 2 3; do
  8. echo $i
  9. done
  10. f
  11. function f { echo $1; }
  12. f 1
  13. # the next two don't work
  14. #function f ( echo $1; )
  15. f 2
  16. #function f ( echo $1 )
  17. f 3
  18. function f for i in 1 2 3; do
  19. echo $i
  20. done
  21. f