diff options
author | Joey Hess <joey@kitenet.net> | 2014-03-26 16:40:52 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-03-26 16:40:52 -0400 |
commit | f2ecf753ca62c284a68ca0272b65b5092e346abf (patch) | |
tree | ad477e43a731180cecd1ba8fd778ba2bbdca15ac | |
parent | ac0f0416b501f4a1d1332a1b78634df0f0d1ae8b (diff) |
avoid generating arbitrary MetaData with illegal fields
-rw-r--r-- | Types/MetaData.hs | 4 | ||||
-rw-r--r-- | doc/bugs/git_annex_test_under_windows_8.1.mdwn | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/Types/MetaData.hs b/Types/MetaData.hs index 706d037bc..8df56734d 100644 --- a/Types/MetaData.hs +++ b/Types/MetaData.hs @@ -264,7 +264,9 @@ parseMetaData p = (,) instance Arbitrary MetaData where arbitrary = do size <- arbitrarySizedBoundedIntegral `suchThat` (< 500) - MetaData . M.fromList <$> vector size + MetaData . M.filterWithKey legal . M.fromList <$> vector size + where + legal k _v = legalField $ fromMetaField k instance Arbitrary MetaValue where arbitrary = MetaValue <$> arbitrary <*> arbitrary diff --git a/doc/bugs/git_annex_test_under_windows_8.1.mdwn b/doc/bugs/git_annex_test_under_windows_8.1.mdwn index efdd8f2cf..2ca64eb61 100644 --- a/doc/bugs/git_annex_test_under_windows_8.1.mdwn +++ b/doc/bugs/git_annex_test_under_windows_8.1.mdwn @@ -62,3 +62,6 @@ e s tDse.t # End of transcript or log. """]] + +> A sort of windows-specific bug in the test suite. I've fixed it. [[done]] +> --[[Joey]] |