Mercurial > vim
comparison src/testdir/test_lambda.vim @ 19249:2a017e9dc6da v8.2.0183
patch 8.2.0183: tests fail when the float feature is disabled
Commit: https://github.com/vim/vim/commit/5feabe00c47fa66d5f4c95213f150488433f78e3
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jan 30 18:24:53 2020 +0100
patch 8.2.0183: tests fail when the float feature is disabled
Problem: Tests fail when the float feature is disabled.
Solution: Skip tests that don't work without float support.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 30 Jan 2020 18:30:04 +0100 |
parents | 3cf9529b3a4a |
children | b3e93a05c3ca |
comparison
equal
deleted
inserted
replaced
19248:5e803caf5e9c | 19249:2a017e9dc6da |
---|---|
214 endfunc | 214 endfunc |
215 | 215 |
216 func Test_lambda_combination() | 216 func Test_lambda_combination() |
217 call assert_equal(2, {x -> {x -> x}}(1)(2)) | 217 call assert_equal(2, {x -> {x -> x}}(1)(2)) |
218 call assert_equal(10, {y -> {x -> x(y)(10)}({y -> y})}({z -> z})) | 218 call assert_equal(10, {y -> {x -> x(y)(10)}({y -> y})}({z -> z})) |
219 call assert_equal(5.0, {x -> {y -> x / y}}(10)(2.0)) | 219 if has('float') |
220 call assert_equal(5.0, {x -> {y -> x / y}}(10)(2.0)) | |
221 endif | |
220 call assert_equal(6, {x -> {y -> {z -> x + y + z}}}(1)(2)(3)) | 222 call assert_equal(6, {x -> {y -> {z -> x + y + z}}}(1)(2)(3)) |
221 | 223 |
222 call assert_equal(6, {x -> {f -> f(x)}}(3)({x -> x * 2})) | 224 call assert_equal(6, {x -> {f -> f(x)}}(3)({x -> x * 2})) |
223 call assert_equal(6, {f -> {x -> f(x)}}({x -> x * 2})(3)) | 225 call assert_equal(6, {f -> {x -> f(x)}}({x -> x * 2})(3)) |
224 | 226 |