Mercurial > vim
comparison src/vim9compile.c @ 27738:d754ac2f5ac5 v8.2.4395
patch 8.2.4395: some code lines not covered by tests
Commit: https://github.com/vim/vim/commit/8b716f5f2204f938769de283d43bcb2f77d403e7
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Feb 15 21:17:56 2022 +0000
patch 8.2.4395: some code lines not covered by tests
Problem: Some code lines not covered by tests.
Solution: Add a few more test cases. Fix getting more than one error for
invalid assignment.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 15 Feb 2022 22:30:04 +0100 |
parents | fdc841530372 |
children | 6e5d378919c4 |
comparison
equal
deleted
inserted
replaced
27737:9e05a238b0f0 | 27738:d754ac2f5ac5 |
---|---|
2418 } | 2418 } |
2419 } | 2419 } |
2420 | 2420 |
2421 if (*eap->cmd == '[') | 2421 if (*eap->cmd == '[') |
2422 { | 2422 { |
2423 // [var, var] = expr | 2423 // might be "[var, var] = expr" |
2424 *line = compile_assignment(eap->cmd, eap, CMD_SIZE, cctx); | 2424 *line = compile_assignment(eap->cmd, eap, CMD_SIZE, cctx); |
2425 if (*line == NULL) | 2425 if (*line == NULL) |
2426 return FAIL; | 2426 return FAIL; |
2427 if (*line != eap->cmd) | 2427 if (*line != eap->cmd) |
2428 return OK; | 2428 return OK; |
2956 case CMD_const: | 2956 case CMD_const: |
2957 case CMD_increment: | 2957 case CMD_increment: |
2958 case CMD_decrement: | 2958 case CMD_decrement: |
2959 line = compile_assignment(p, &ea, ea.cmdidx, &cctx); | 2959 line = compile_assignment(p, &ea, ea.cmdidx, &cctx); |
2960 if (line == p) | 2960 if (line == p) |
2961 { | |
2962 emsg(_(e_invalid_assignment)); | |
2961 line = NULL; | 2963 line = NULL; |
2964 } | |
2962 break; | 2965 break; |
2963 | 2966 |
2964 case CMD_unlet: | 2967 case CMD_unlet: |
2965 case CMD_unlockvar: | 2968 case CMD_unlockvar: |
2966 case CMD_lockvar: | 2969 case CMD_lockvar: |