diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-02-02 18:20:08 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-02-02 18:20:08 +0100 |
commit | 56ead341a75e1a0395eee94a3280c67e2278a57e (patch) | |
tree | 52c81e0242666bf75c227a392473bf5ea26cf6dd /src/Makefile | |
parent | d9ea9069f5ef5b8b9f9e0d0daecdd124e2dcd818 (diff) | |
download | vim-git-56ead341a75e1a0395eee94a3280c67e2278a57e.tar.gz |
patch 7.4.1238v7.4.1238
Problem: Can't handle two messages right after each other.
Solution: Find the end of the JSON. Read more when incomplete. Add a C
test for the JSON decoding.
Diffstat (limited to 'src/Makefile')
-rw-r--r-- | src/Makefile | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/src/Makefile b/src/Makefile index 8fd59fb08..31664b671 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1545,11 +1545,13 @@ EXTRA_SRC = hangulin.c if_lua.c if_mzsch.c auto/if_perl.c if_perlsfio.c \ $(GRESOURCE_SRC) # Unittest files +JSON_TEST_SRC = json_test.c +JSON_TEST_TARGET = json_test$(EXEEXT) MEMFILE_TEST_SRC = memfile_test.c MEMFILE_TEST_TARGET = memfile_test$(EXEEXT) -UNITTEST_SRC = $(MEMFILE_TEST_SRC) -UNITTEST_TARGETS = $(MEMFILE_TEST_TARGET) +UNITTEST_SRC = $(JSON_TEST_SRC) $(MEMFILE_TEST_SRC) +UNITTEST_TARGETS = $(JSON_TEST_TARGET) $(MEMFILE_TEST_TARGET) # All sources, also the ones that are not configured ALL_SRC = $(BASIC_SRC) $(ALL_GUI_SRC) $(UNITTEST_SRC) $(EXTRA_SRC) @@ -1588,7 +1590,6 @@ OBJ_COMMON = \ $(HANGULIN_OBJ) \ objects/if_cscope.o \ objects/if_xcmdsrv.o \ - objects/json.o \ objects/mark.o \ objects/memline.o \ objects/menu.o \ @@ -1914,6 +1915,7 @@ types.vim: $(TAGS_SRC) $(TAGS_INCL) ctags --c-kinds=gstu -o- $(TAGS_SRC) $(TAGS_INCL) |\ awk 'BEGIN{printf("syntax keyword Type\t")}\ {printf("%s ", $$1)}END{print ""}' > $@ + echo "syn keyword Constant OK FAIL TRUE FALSE MAYBE" >> $@ # Execute the test scripts. Run these after compiling Vim, before installing. # This doesn't depend on $(VIMTARGET), because that won't work when configure @@ -1948,6 +1950,12 @@ unittest unittests: $(UNITTEST_TARGETS) ./$$t || exit 1; echo $$t passed; \ done +run_json_test: $(JSON_TEST_TARGET) + ./$(JSON_TEST_TARGET) + +run_memfile_test: $(MEMFILE_TEST_TARGET) + ./$(MEMFILE_TEST_TARGET) + # Run individual OLD style test, assuming that Vim was already compiled. test1 \ test_autocmd_option \ @@ -2040,6 +2048,13 @@ testclean: # Unittests # It's build just like Vim to satisfy all dependencies. +$(JSON_TEST_TARGET): auto/config.mk objects $(JSON_TEST_OBJ) + $(CCC) version.c -o objects/version.o + @LINK="$(PURIFY) $(SHRPENV) $(CClink) $(ALL_LIB_DIRS) $(LDFLAGS) \ + -o $(JSON_TEST_TARGET) $(JSON_TEST_OBJ) $(ALL_LIBS)" \ + MAKE="$(MAKE)" LINK_AS_NEEDED=$(LINK_AS_NEEDED) \ + sh $(srcdir)/link.sh + $(MEMFILE_TEST_TARGET): auto/config.mk objects $(MEMFILE_TEST_OBJ) $(CCC) version.c -o objects/version.o @LINK="$(PURIFY) $(SHRPENV) $(CClink) $(ALL_LIB_DIRS) $(LDFLAGS) \ @@ -2811,6 +2826,9 @@ objects/integration.o: integration.c objects/json.o: json.c $(CCC) -o $@ json.c +objects/json_test.o: json_test.c + $(CCC) -o $@ json_test.c + objects/main.o: main.c $(CCC) -o $@ main.c @@ -3301,6 +3319,10 @@ objects/gui_at_fs.o: gui_at_fs.c vim.h auto/config.h feature.h os_unix.h \ objects/pty.o: pty.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h ascii.h \ keymap.h term.h macros.h option.h structs.h regexp.h gui.h gui_beval.h \ proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h farsi.h arabic.h +objects/json_test.o: json_test.c main.c vim.h auto/config.h feature.h os_unix.h \ + auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \ + regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \ + globals.h farsi.h arabic.h farsi.c arabic.c json.c objects/memfile_test.o: memfile_test.c main.c vim.h auto/config.h feature.h \ os_unix.h auto/osdef.h ascii.h keymap.h term.h macros.h option.h \ structs.h regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h \ |