test.sh 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. #!/bin/sh
  2. #
  3. # Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
  4. # All rights reserved.
  5. # This component and the accompanying materials are made available
  6. # under the terms of the License "Eclipse Public License v1.0"
  7. # which accompanies this distribution, and is available
  8. # at the URL "http://www.eclipse.org/legal/epl-v10.html".
  9. #
  10. # Initial Contributors:
  11. # Nokia Corporation - initial contribution.
  12. #
  13. # Contributors:
  14. #
  15. # Description:
  16. #
  17. # Test script for caseless fuse filesystem
  18. #
  19. . ./test_common.sh
  20. export TESTDIR=$MOUNTPOINT
  21. test_mkdir() {
  22. doit "mkdir" <<EOT3
  23. mkdir "$TESTDIR"/mkdir &&
  24. ls "$TESTDIR"/mkdir
  25. EOT3
  26. }
  27. test_touchfile() {
  28. doit "touchfile" <<EOT4
  29. touch "$TESTDIR"/touchfile &&
  30. ls "$TESTDIR"/touchfile
  31. EOT4
  32. }
  33. test_filecase() {
  34. doit "filecase" <<EOT5
  35. touch "$TESTDIR"/filecase &&
  36. ls "$TESTDIR"/fileCase
  37. EOT5
  38. }
  39. test_slashconv() {
  40. doit "slashconv" <<EOT5
  41. mkdir "$TESTDIR"/conv &&
  42. mkdir "$TESTDIR"/conv/sub &&
  43. ls "$TESTDIR/conv\\\\sub"
  44. EOT5
  45. }
  46. test_dircase() {
  47. doit "dircase" <<EOT6
  48. mkdir "$TESTDIR"/dircase &&
  49. touch "$TESTDIR"/dirCase/file1 &&
  50. ls "$TESTDIR"/dirCase/file1
  51. EOT6
  52. }
  53. test_errors() {
  54. doit "errors" <<EOT6
  55. (! mkdir "$TESTDIR"/notexist/impossible) &&
  56. (! touch "$TESTDIR"/notexist/impossible2) &&
  57. (! rm "$TESTDIR"/notexist/impossible3 )
  58. EOT6
  59. }
  60. cleanup &&
  61. init &&
  62. test_mkdir &&
  63. test_touchfile &&
  64. test_filecase &&
  65. test_slashconv &&
  66. test_errors &&
  67. test_dircase
  68. if [ $? -ne 0 ]; then
  69. echo "FAILED: filesystem test '$FSTESTNAME'"
  70. fi