test.v.timestamp.sh 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. # This is a simple timestamp check, creation and removal test
  2. # We need to set a specific region in the
  3. # @preprocess step of this test. We generate
  4. # raster data with r.mapcalc.
  5. # The region setting should work for UTM and LL test locations
  6. g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3
  7. # Lets gerenate a test map
  8. v.random --o seed=1 npoints=20 output=map
  9. # The first @test uses several different absolute datum formats
  10. v.timestamp map=map date=none
  11. v.timestamp map=map
  12. v.timestamp map=map layer=1 date="2003"
  13. v.timestamp map=map layer=1
  14. v.timestamp map=map layer=2 date="Jul 2003"
  15. v.timestamp map=map layer=2
  16. v.timestamp map=map date="14 Jul 2003"
  17. v.timestamp map=map
  18. v.timestamp map=map date="14 Jul 2003 10"
  19. v.timestamp map=map
  20. v.timestamp map=map layer=3 date="14 Jul 2003 10:30 +0700"
  21. v.timestamp map=map layer=3
  22. v.timestamp map=map layer=4 date="14 Jul 2003 10:30:25"
  23. v.timestamp map=map layer=4
  24. v.timestamp map=map layer=2 date="14 Jul 2003 10:30:25 +0700 / 15 Jul 2003 11:35:12 +0700"
  25. v.timestamp map=map layer=2
  26. v.timestamp map=map layer=3 date="14 Jul 2003 10:30:25 +0700 / 15 Jul 2003"
  27. v.timestamp map=map layer=3
  28. v.info map=map
  29. v.timestamp map=map date=none
  30. v.timestamp map=map layer=2 date=none
  31. v.timestamp map=map layer=3 date=none
  32. v.timestamp map=map layer=4 date=none
  33. v.timestamp map=map
  34. v.timestamp map=map layer=2
  35. v.timestamp map=map layer=3
  36. v.timestamp map=map layer=4
  37. # The second @test uses several different relative datum formats
  38. v.timestamp map=map date=none
  39. v.timestamp map=map
  40. v.timestamp map=map date="2 years"
  41. v.timestamp map=map
  42. v.timestamp map=map date="2 years 3 months"
  43. v.timestamp map=map
  44. v.timestamp map=map layer=1 date="5 days"
  45. v.timestamp map=map layer=1
  46. v.timestamp map=map layer=2 date="3 hours"
  47. v.timestamp map=map layer=2
  48. v.timestamp map=map layer=1 date="5 minutes 30 seconds"
  49. v.timestamp map=map layer=1
  50. v.timestamp map=map layer=2 date="2 years 2 months / 5 years 8 months"
  51. v.timestamp map=map layer=2
  52. v.info map=map
  53. v.timestamp map=map date=none
  54. v.timestamp map=map layer=2 date=none
  55. v.timestamp map=map layer=3 date=none
  56. v.timestamp map=map
  57. v.timestamp map=map layer=2
  58. v.timestamp map=map layer=3
  59. # The third @test to check @failure with wrong time stamps
  60. g.message message="Now checking for expected failures due to wrong time stamps..."
  61. v.timestamp map=map date="2 years 3 months 8 days"
  62. v.timestamp map=map date="1 month 5 days"
  63. v.timestamp map=map date="July 2003"
  64. v.timestamp map=map date="14 Jul 2003 +0700"