 
       describe 'Tables at the end of document', ->
         modTest = testFormat editorFormat, (text, rand) ->
-          nonTables[Math.floor(rand * nonTables.length)] + '\n' + text
+          modCrLf nonTables[Math.floor(rand * nonTables.length)] + opts.crlf + text
         testSuite modTest
 
       describe 'Tables at the beginning of document', ->
         modTest = testFormat editorFormat, (text, rand) ->
-          text + '\n' + nonTables[Math.floor(rand * nonTables.length)]
+          modCrLf text + opts.crlf + nonTables[Math.floor(rand * nonTables.length)]
         testSuite modTest
 
       it 'should properly format large text', ->

        expected = ''
        for table in testTables
          text = nonTables[Math.floor(Math.random() * nonTables.length)]
          edtext += '\n' + text + '\n' + table.test
          expected += '\n' + text + '\n' + table.expected
        test edtext, expected

  runEditorTests 'language-gfm', 'empty.md', 'source.gfm'
  runEditorTests 'language-text', 'empty.text', 'text.plain.null-grammar'
  runEditorTests 'language-text', 'empty.text', 'text.plain.null-grammar',
    addGrammar: false
    selectBeforeTest: true

            atom.workspace.open("#{__dirname}#{sep}fixtures#{sep}#{fixture}")
          .then (ed) ->
            editor = ed
            editor.getBuffer().setPreferredLineEnding(opts.crlf)
          .then ->
            if opts.addGrammar
              atom.commands.dispatch atom.views.getView(editor), 'markdown-table-formatter:enable-for-current-scope'
