diff options
| author | alex <alex@cloudware.io> | 2020-02-21 18:47:10 +0100 |
|---|---|---|
| committer | alex <alex@cloudware.io> | 2020-02-21 18:51:25 +0100 |
| commit | 2d629211d15764872853430cf5e0c362e9d16ad1 (patch) | |
| tree | a410787ab29f19acd024a55f2adce0747af0b448 /vis/interop/pre-save-grows.lua | |
| parent | 8083f7109f8173679f179e805c579cf1a0f5c6d2 (diff) | |
test/vis: add a couple lua-vis interop tests
The tests assert that the entire file text is written to disk
even if mutated in a vis.events.FILE_SAVE_PRE hooks.
Diffstat (limited to 'vis/interop/pre-save-grows.lua')
| -rw-r--r-- | vis/interop/pre-save-grows.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/vis/interop/pre-save-grows.lua b/vis/interop/pre-save-grows.lua new file mode 100644 index 0000000..8cf4887 --- /dev/null +++ b/vis/interop/pre-save-grows.lua @@ -0,0 +1,7 @@ +vis.events.subscribe(vis.events.FILE_SAVE_PRE, function(file) + local lines = file.lines + for i=1, #lines do + lines[i] = lines[i]..' bigger' + end + return true +end) |
