Crossplatform test

merge both win+linux.
Not yet tested in linux, but I copy-paste from your linux test code.