MIME Type puzzle discussion


The stub now uses 256 instead of 50 to match the dataset


The test is not correct in the sense that filename “.pdf” has no extension at all - in Unix-like OSes it is a dot file, a hidden one. So in the D programming language its standard library function “extension” returns that “.pdf” file has no extension but this test expected it has “.pdf” extension. It would be better if you fix this I guess.


Although in real situation you are right the statement is clear

The extension of a file is defined as the substring which follows the last occurrence, if any, of the dot character within the file name

So the test case is respecting the rules.


Well, that’s true too