{"action":"created","issue":{"url":"https://api.github.com/repos/htacg/tidy-html5-tests/issues/2","repository_url":"https://api.github.com/repos/htacg/tidy-html5-tests","labels_url":"https://api.github.com/repos/htacg/tidy-html5-tests/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/htacg/tidy-html5-tests/issues/2/comments","events_url":"https://api.github.com/repos/htacg/tidy-html5-tests/issues/2/events","html_url":"https://github.com/htacg/tidy-html5-tests/issues/2","id":138475430,"number":2,"title":"Need to check line ending for tests 500236 and 661606","user":{"login":"geoffmcl","id":1333435,"avatar_url":"https://avatars.githubusercontent.com/u/1333435?v=3","gravatar_id":"","url":"https://api.github.com/users/geoffmcl","html_url":"https://github.com/geoffmcl","followers_url":"https://api.github.com/users/geoffmcl/followers","following_url":"https://api.github.com/users/geoffmcl/following{/other_user}","gists_url":"https://api.github.com/users/geoffmcl/gists{/gist_id}","starred_url":"https://api.github.com/users/geoffmcl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoffmcl/subscriptions","organizations_url":"https://api.github.com/users/geoffmcl/orgs","repos_url":"https://api.github.com/users/geoffmcl/repos","events_url":"https://api.github.com/users/geoffmcl/events{/privacy}","received_events_url":"https://api.github.com/users/geoffmcl/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/htacg/tidy-html5-tests/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/htacg/tidy-html5-tests/labels/help%20wanted","name":"help wanted","color":"159818"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-03-04T13:23:20Z","updated_at":"2016-03-08T14:16:12Z","closed_at":null,"body":"These two tests are ok in windows, but for some strange reason when cloned into linux, the `expected` files retain the windows line ending?\r\n\r\nThis means the diff compare fails in unix, and probably mac, unless an option added to ignore space, like -w, which should **not** be required.\r\n\r\nFor the moment these tests have been moved to the `cases/specials` folder, and removed from the tests manifest `cases\\testbase\\_manifest.txt`.\r\n\r\nWe need to discover why git does this, and somehow fix it. \r\n\r\nA less liked alternative would be to instruct tidy, through its config, to output a matching CRLF - see [newline](http://api.html-tidy.org/tidy/quickref_5.1.25.html#newline) - but this should **not** be required!\r\n\r\nNeedless to say, at some point they must be recovered from `special` and added back to the `testbase` manifest.\r\n"},"comment":{"url":"https://api.github.com/repos/htacg/tidy-html5-tests/issues/comments/193799258","html_url":"https://github.com/htacg/tidy-html5-tests/issues/2#issuecomment-193799258","issue_url":"https://api.github.com/repos/htacg/tidy-html5-tests/issues/2","id":193799258,"user":{"login":"geoffmcl","id":1333435,"avatar_url":"https://avatars.githubusercontent.com/u/1333435?v=3","gravatar_id":"","url":"https://api.github.com/users/geoffmcl","html_url":"https://github.com/geoffmcl","followers_url":"https://api.github.com/users/geoffmcl/followers","following_url":"https://api.github.com/users/geoffmcl/following{/other_user}","gists_url":"https://api.github.com/users/geoffmcl/gists{/gist_id}","starred_url":"https://api.github.com/users/geoffmcl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoffmcl/subscriptions","organizations_url":"https://api.github.com/users/geoffmcl/orgs","repos_url":"https://api.github.com/users/geoffmcl/repos","events_url":"https://api.github.com/users/geoffmcl/events{/privacy}","received_events_url":"https://api.github.com/users/geoffmcl/received_events","type":"User","site_admin":false},"created_at":"2016-03-08T14:16:12Z","updated_at":"2016-03-08T14:16:12Z","body":"@balthisar thanks for digging into this mystery ;=))\r\n\r\nWow, you introduce another level of complexity - cross platform testing - like comparing the `expected` in one OS with the `results` in another, as you seem to have done using a VM - OS X to WIN32. Well, if this is likely to be done by others maybe we should add something to the readme like - \"cross platform compare testing can yield ambiguous results, mainly due to different line endings!\"\r\n\r\nSo first to look at and deal with the 2 new test numbers individually, only really suggested by examining the zip, but are they a problem?\r\n\r\n### 647255 - UTF-16LE\r\n\r\nThanks for showing me a method to test if git considers a file as binary or not. And it seems the presence of a BOM can cause git to consider it binary. Good to know...\r\n\r\nBut this test **passes** in Windows and Linux. It seems both my WIN32 port of diff 2.7, and my linux diff 3.3, have no problem dealing with this BOM, with or without the -a parameter. The `input`, `expects` and `results` have this BOM.\r\n\r\n**Is there some problem in OS X?**\r\n\r\nIf **not** then we can forget this one. And thus forget your new `testutf` branch, which I did not try...\r\n\r\nIf **yes**, then we need to exclude it for now, until we find a solution, maybe offered by your `testutf` branch. Advise.\r\n\r\n### 427633 - Mixed EOL\r\n\r\nYes, this was inherited with **mixed** line endings, specifically as a test of tidy handling of such a mixture, so should **not** be cleaned, sanitised...\r\n\r\nBut again this test **passes** in Windows and Linux.\r\n\r\n**Is there some problem in OS X?**\r\n\r\nLikewise, if **not** then we can forget this one. \r\n\r\nIf **yes**, then we need to exclude it for now, until we find a solution, but that should not be by cleaning the file since that is the reason for the test.\r\n\r\nAnd if there continues to be a problem with either of these two tests, in OS X, then maybe they can be a separate issue(s)? Advise.\r\n\r\nSo that gets me to the two tests, the subject of this issue \r\n\r\n - **500236** another mixed, and\r\n - **661606** with shiftjis\r\n \r\n### 500236 - Mixed EOL\r\n\r\nSince EOL is not the subject of the test, I would have no problem with fixing this corruption. As far as I can tell back in SF cvs it was **not** so corrupted!\r\n\r\nAnd that is what I really tried to do in the `test1` branch, but it **failed**!\r\n\r\nBut I now think maybe git keeps a file memory, and thus even though I thought I had fixed it, git still generated a mess, pulling `expects` as a LF in windows! Yuk! You showed git does not seem to consider it binary... but once given different line ending, somehow, git sort of holds on to them...\r\n\r\nBut as you also showed, giving it a **new** name, `result-cleaned--500236.html`, and predicted, and it correctly pulls as CRLF in windows, and as LF in unix, as it should...\r\n\r\nSo I propose adding a new test `500236-1`, adding your cleaned version, adjusting the manifest, and this should be **fixed**. And we just completely delete the current 500236. This could be directly done in `master`.\r\n\r\nWhat do you think?\r\n\r\n### 661606 - shiftjis\r\n\r\nAs we know this uses a config of `char-encoding: shiftjis`, and contains some 'strange' characters, so if possible I would like to get it back into the mainstream... it is the only example we have of its kind...\r\n\r\nI will find time to examine this further, and hope you can also cast an eye on it... thanks...\r\n"}}