Browse Source

- enhanced testcases to support 1.0

- moved testbag for v0.97 to new subdir
- added v1.0 based testbag including new recommended sha512 manifest files
master
art1pirat 1 year ago
parent
commit
673115ae9d
13 changed files with 39 additions and 3 deletions
  1. +9
    -0
      test/testbag.cpp
  2. +1
    -1
      testbags/bag_minimal_ok/bagit.txt
  3. +4
    -0
      testbags/bag_minimal_ok/manifest-sha512.txt
  4. +3
    -2
      testbags/bag_minimal_ok/tagmanifest-md5.txt
  5. +4
    -0
      testbags/bag_minimal_ok/tagmanifest-sha512.txt
  6. +7
    -0
      testbags/bag_minimal_v0.97/bag-info.txt
  7. +2
    -0
      testbags/bag_minimal_v0.97/bagit.txt
  8. +1
    -0
      testbags/bag_minimal_v0.97/data/1.txt
  9. +0
    -0
      testbags/bag_minimal_v0.97/data/3.dat
  10. +0
    -0
      testbags/bag_minimal_v0.97/data/subdir/2.dat
  11. +1
    -0
      testbags/bag_minimal_v0.97/data/subdir/2.md5
  12. +4
    -0
      testbags/bag_minimal_v0.97/manifest-md5.txt
  13. +3
    -0
      testbags/bag_minimal_v0.97/tagmanifest-md5.txt

+ 9
- 0
test/testbag.cpp View File

@@ -74,15 +74,24 @@ BOOST_AUTO_TEST_CASE(constructor2) {
BOOST_AUTO_TEST_CASE(constructor3) {
BOOST_TEST(check_constructor("../testbags/bag_minimal_ok/"));
};
BOOST_AUTO_TEST_CASE(constructor3_old) {
BOOST_TEST(check_constructor("../testbags/bag_minimal_v0.97/"));
};
BOOST_AUTO_TEST_CASE(check_validation_ok) {
BOOST_TEST(check_validation("../testbags/bag_minimal_ok/"));
};
BOOST_AUTO_TEST_CASE(check_validation_ok_old) {
BOOST_TEST(check_validation("../testbags/bag_minimal_v0.97/"));
};
BOOST_AUTO_TEST_CASE(check_validation_buggy) {
BOOST_TEST(!check_validation("../testbags/1008_buggy/"));
};
BOOST_AUTO_TEST_CASE(check_get_all_bag_files_ok) {
BOOST_TEST(check_get_all_bag_files("../testbags/bag_minimal_ok"));
};
BOOST_AUTO_TEST_CASE(check_get_all_bag_files_ok_old) {
BOOST_TEST(check_get_all_bag_files("../testbags/bag_minimal_v0.97"));
};

BOOST_FIXTURE_TEST_CASE(check_store_ok, TARGETFIXTURE) {
BOOST_TEST(check_store("../testbags/bag_minimal_ok/", targetdir));


+ 1
- 1
testbags/bag_minimal_ok/bagit.txt View File

@@ -1,2 +1,2 @@
BagIt-Version: 0.97
BagIt-Version: 1.0
Tag-File-Character-Encoding: UTF-8

+ 4
- 0
testbags/bag_minimal_ok/manifest-sha512.txt View File

@@ -0,0 +1,4 @@
052cf2a5a608ce906d08d0d59d85d33b4d324cf0f14822aef727e700edd9dccfe6eb3613e0e32f047e5f36cfd0a67634325253d6c626eb6d3f3f74b28fe3903d data/1.txt
cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e data/3.dat
cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e data/subdir/2.dat
a76c1de5fab3e09bc8f50225018da99a17c91addc1851ff7b201d41541a36cabe2c8b35f0477511368ab97e2da7fcb7a079a17379efb2a29c410454bb2fd9083 data/subdir/2.md5

+ 3
- 2
testbags/bag_minimal_ok/tagmanifest-md5.txt View File

@@ -1,3 +1,4 @@
eeb6a5fdefea86c1d0347eedcf2cbb15 bag-info.txt
9e5ad981e0d29adc278f6a294b8c2aca bagit.txt
939f3a18385ca2975ed6a02f4a180758 manifest-md5.txt
eaa2c609ff6371712f623f5531945b44 bagit.txt
370facc74b75cc9571b0322667105f7a manifest-sha512.txt
eeb6a5fdefea86c1d0347eedcf2cbb15 bag-info.txt

+ 4
- 0
testbags/bag_minimal_ok/tagmanifest-sha512.txt View File

@@ -0,0 +1,4 @@
a93c31d1103f6c8ec8831fe0b7b2c99eca8c0cf505f635ff21358dbdc763b6061b7800bbd2d890deb19eca137d63b00c155a56ad7e56f97887b4d9d2886da29c ./manifest-md5.txt
1d73ae108d4109b61f56698a5e19ee1f8947bdf8940bbce6adbe5e0940c2363caace6a547b4f1b3ec6a4fd2b7fa845e9cb9d28823bc72c59971718bb26f2fbd8 ./bagit.txt
c342c77356135f4fca40253ec3a491dc6a68b7247d2310c90ec01160437f19eb82af309fdb00321cf66109d53a2f14e830cd7292dc1ab5ec5f8d38e70b802297 ./manifest-sha512.txt
a37ec3c077514ef7ccffefbafb98fa34ba7147a5902a40ae76d48807d69827ba252a775815324357ffda81174a8af38fdfa3d01136e0400252bd2fbc426bcd85 ./bag-info.txt

+ 7
- 0
testbags/bag_minimal_v0.97/bag-info.txt View File

@@ -0,0 +1,7 @@
External-Identifier: testbag-01
Payload-Oxum: 38.4
Bagging-Date: 2015-12-28
Bag-Size: 16 B
External-Description: 3.dat
Foo: bar baz
blurp

+ 2
- 0
testbags/bag_minimal_v0.97/bagit.txt View File

@@ -0,0 +1,2 @@
BagIt-Version: 0.97
Tag-File-Character-Encoding: UTF-8

+ 1
- 0
testbags/bag_minimal_v0.97/data/1.txt View File

@@ -0,0 +1 @@
text

+ 0
- 0
testbags/bag_minimal_v0.97/data/3.dat View File


+ 0
- 0
testbags/bag_minimal_v0.97/data/subdir/2.dat View File


+ 1
- 0
testbags/bag_minimal_v0.97/data/subdir/2.md5 View File

@@ -0,0 +1 @@
d41d8cd98f00b204e9800998ecf8427e

+ 4
- 0
testbags/bag_minimal_v0.97/manifest-md5.txt View File

@@ -0,0 +1,4 @@
e1cbb0c3879af8347246f12c559a86b5 data/1.txt
d41d8cd98f00b204e9800998ecf8427e data/3.dat
d41d8cd98f00b204e9800998ecf8427e data/subdir/2.dat
227bc609651f929e367c3b2b79e09d5b data/subdir/2.md5

+ 3
- 0
testbags/bag_minimal_v0.97/tagmanifest-md5.txt View File

@@ -0,0 +1,3 @@
eeb6a5fdefea86c1d0347eedcf2cbb15 bag-info.txt
9e5ad981e0d29adc278f6a294b8c2aca bagit.txt
939f3a18385ca2975ed6a02f4a180758 manifest-md5.txt

Loading…
Cancel
Save