예제 #1
0
 def test_span_from_view_selection(self):
     window = mock_window([cur_dir + '/projects/helloworld'])
     view = mock_view('src/Main.hs', window)
     span = utility.span_from_view_selection(view)
     self.assertEqual(1, span['spanFromLine'])
     self.assertEqual(1, span['spanToLine'])
     self.assertEqual(1, span['spanFromColumn'])
     self.assertEqual(1, span['spanToColumn'])
     self.assertEqual('src/Main.hs', span['spanFilePath'])
예제 #2
0
 def test_get_relative_filename(self):
     window = mock_window([cur_dir + '/projects/helloworld'])
     view = mock_view('src/Main.hs', window)
     self.assertEqual('src/Main.hs', utility.relative_view_file_name(view))
예제 #3
0
 def test_is_haskell_view(self):
     window = mock_window([cur_dir + '/projects/helloworld'])
     view = mock_view('src/Main.hs', window)
     self.assertTrue(utility.is_haskell_view(view))