diff --git a/rbql_core/test/csv_files/movies_multichar_separator.txt b/rbql_core/test/csv_files/movies_multichar_separator.txt new file mode 100644 index 0000000..3f075a9 --- /dev/null +++ b/rbql_core/test/csv_files/movies_multichar_separator.txt @@ -0,0 +1,20 @@ +Dum Maaro Dum~#~India~#~Hindi~#~2011~#~Rohan Sippy~#~Color~#~Action|Crime|Drama|Thriller~#~128 +Enough~#~United States~#~English~#~2002~#~Michael Apted~#~Color~#~Crime|Drama|Thriller~#~115 +Meet the Fockers~#~United States~#~English~#~2004~#~Jay Roach~#~Color~#~Comedy|Romance~#~106 +Deck the Halls~#~United States~#~English~#~2006~#~John Whitesell~#~Color~#~Comedy|Family~#~93 +Micmacs~#~France~#~French~#~2009~#~Jean-Pierre Jeunet~#~Color~#~Action|Comedy|Crime~#~105 +The Dictator~#~United States~#~English~#~2012~#~Larry Charles~#~Color~#~Comedy|Romance~#~99 +The Story of Us~#~United States~#~English~#~1999~#~Rob Reiner~#~Color~#~Comedy|Drama|Romance~#~95 +Captain America: The First Avenger~#~United States~#~English~#~2011~#~Joe Johnston~#~Color~#~Action|Adventure|Sci-Fi~#~124 +The Hunger Games: Mockingjay - Part 1~#~United States~#~English~#~2014~#~Francis Lawrence~#~Color~#~Adventure|Sci-Fi|Thriller~#~123 +The Dark Knight Rises~#~United States~#~English~#~2012~#~Christopher Nolan~#~Color~#~Action|Thriller~#~164 +Cop Out~#~United States~#~English~#~2010~#~Kevin Smith~#~Color~#~Action|Comedy|Crime~#~107 +Resident Evil: Extinction~#~France~#~English~#~2007~#~Russell Mulcahy~#~Color~#~Action|Horror|Sci-Fi|Thriller~#~94 +Shark Night 3D~#~United States~#~English~#~2011~#~David R. Ellis~#~Color~#~Horror|Thriller~#~90 +Elektra~#~Canada~#~English~#~2005~#~Rob Bowman~#~Color~#~Action|Crime|Fantasy|Thriller~#~100 +Pan~#~United States~#~English~#~2015~#~Joe Wright~#~Color~#~Adventure|Family|Fantasy~#~111 +To Die For~#~United States~#~English~#~1995~#~Gus Van Sant~#~Color~#~Comedy|Crime|Drama~#~106 +The Blue Bird~#~United States~#~English~#~1940~#~Walter Lang~#~Black and White~#~Drama|Family|Fantasy~#~83 +Biutiful~#~Mexico~#~Spanish~#~2010~#~Alejandro G. Iñárritu~#~Color~#~Drama~#~148 +I Can Do Bad All by Myself~#~United States~#~English~#~2009~#~Tyler Perry~#~Color~#~Comedy|Drama~#~113 +The Perfect Host~#~United States~#~English~#~2010~#~Nick Tomnay~#~Color~#~Comedy|Crime|Thriller~#~93 diff --git a/test/test_vim_integration.sh b/test/test_vim_integration.sh index 482fefb..1069d9d 100755 --- a/test/test_vim_integration.sh +++ b/test/test_vim_integration.sh @@ -82,7 +82,7 @@ if [ $errors != 0 ] || [ ! -e vim_debug.log ] ; then exit 1 fi -if [ $total != 6 ] || [ $started != $finished ] || [ $fails != 0 ] ; then +if [ $total != 7 ] || [ $started != $finished ] || [ $fails != 0 ] ; then echo "FAIL! Integration tests failed: see vim_unit_test.log" 1>&2 exit 1 fi diff --git a/test/unit_tests.vim b/test/unit_tests.vim index 6a8c2f2..e7a2049 100644 --- a/test/unit_tests.vim +++ b/test/unit_tests.vim @@ -69,6 +69,15 @@ :let log_msg = (&ft == 'csv') ? 'OK' : 'FAIL' :call add(g:rbql_test_log_records, log_msg) +:e ../rbql_core/test/csv_files/movies_multichar_separator.txt +:sleep 1 +:call rainbow_csv#set_rainbow_filetype('~#~', 'simple') +:sleep 1 +:Select a2, COUNT(*) GROUP BY a2 +:sleep 1 +:let num_lines = line('$') +:let log_msg = (num_lines == 5) ? 'OK' : 'FAIL' +:call add(g:rbql_test_log_records, log_msg) :call add(g:rbql_test_log_records, 'Finished full integration tests') :call writefile(g:rbql_test_log_records, "./vim_unit_tests.log")