diff options
author | Kim Alvefur <zash@zash.se> | 2023-07-16 18:33:53 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2023-07-16 18:33:53 +0200 |
commit | a906513d328a5f2cece050c5936571a185ce5384 (patch) | |
tree | 5fc76c7923de8efb44c8f64d70ecc0e37b91c30a | |
parent | d21e26882c3102f9273d3298e7b21c1a4d6db76e (diff) | |
download | prosody-a906513d328a5f2cece050c5936571a185ce5384.tar.gz prosody-a906513d328a5f2cece050c5936571a185ce5384.zip |
tools: Add mod2spec.sh, turns util.example into spec/util_example_spec.lua
Useful for opening a module and its tests at the same, can be awkward to
auto-complete sometimes.
sensible-editor util/example.lua $(./tools/mod2spec.sh util.example)
-rwxr-xr-x | tools/mod2spec.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/mod2spec.lua b/tools/mod2spec.lua new file mode 100755 index 00000000..74b3021b --- /dev/null +++ b/tools/mod2spec.lua @@ -0,0 +1,4 @@ +#!/bin/sh +set -eu + +echo "spec/${1//./_}_spec.lua" |