|
40 | 40 |
|
41 | 41 | T["setup()"]["overrides default values"] = function() |
42 | 42 | child.lua([[require('search-and-replace').setup({ |
43 | | - -- write all the options with a value different than the default ones |
44 | 43 | debug = true, |
| 44 | + default_replace_prompt_to_normal_mode = true, |
| 45 | + default_replace_prompt_to_selection = true, |
| 46 | + ---@type table |
| 47 | + mappings = { |
| 48 | + enabled = true, |
| 49 | + search_and_replace_by_pattern = "<Leader>foo", |
| 50 | + replace_by_pattern = "<Leader>bar", |
| 51 | + replace_by_reference = "<Leader>baz", |
| 52 | + replace_undo = "<Leader>buz", |
| 53 | + }, |
45 | 54 | })]]) |
46 | 55 |
|
47 | 56 | -- assert the value, and the type |
48 | | - Helpers.expect.config(child, "debug", true) |
49 | | - Helpers.expect.config_type(child, "debug", "boolean") |
| 57 | + Helpers.expect.config(child, "", { |
| 58 | + debug = true, |
| 59 | + default_replace_prompt_to_normal_mode = true, |
| 60 | + default_replace_prompt_to_selection = true, |
| 61 | + mappings = { |
| 62 | + enabled = true, |
| 63 | + replace_by_pattern = "<Leader>bar", |
| 64 | + replace_by_reference = "<Leader>baz", |
| 65 | + replace_undo = "<Leader>buz", |
| 66 | + search_and_replace_by_pattern = "<Leader>foo", |
| 67 | + }, |
| 68 | + }) |
50 | 69 | end |
51 | 70 |
|
52 | 71 | return T |
0 commit comments