grub_script_setparams.in 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #! @builddir@/grub-shell-tester
  2. # Run GRUB script in a Qemu instance
  3. # Copyright (C) 2010 Free Software Foundation, Inc.
  4. #
  5. # GRUB is free software: you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation, either version 3 of the License, or
  8. # (at your option) any later version.
  9. #
  10. # GRUB is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. # GNU General Public License for more details.
  14. #
  15. # You should have received a copy of the GNU General Public License
  16. # along with GRUB. If not, see <http://www.gnu.org/licenses/>.
  17. if test x$grubshell = xyes; then cmd=setparams; else cmd=set; fi
  18. function f1 {
  19. echo $#
  20. echo "$#"
  21. echo $@
  22. echo "$@"
  23. echo $*
  24. echo "$*"
  25. echo $1 $2
  26. for v in "$@"; do echo $v; done
  27. shift
  28. echo $1 $2
  29. for v in "$@"; do echo $v; done
  30. $cmd 1 2 3 4
  31. echo $#
  32. echo "$#"
  33. echo $@
  34. echo "$@"
  35. echo $*
  36. echo "$*"
  37. echo $1 $2
  38. for v in "$@"; do echo $v; done
  39. shift
  40. echo $1 $2
  41. for v in "$@"; do echo $v; done
  42. }
  43. # f1
  44. # f1 a
  45. f1 a b
  46. f1 a b c
  47. f1 a b c d
  48. f1 a b c d e