Software /
code /
prosody
Annotate
tools/mod2spec.lua @ 13196:eca44e058eed
util.human.io: Use tail call in test to get correct line numbers
This is probably not guaranteed to work and might vary with Lua version,
but it's good enough for me to get accurate line numbers out of Busted
that don't all point to the test() function.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 16 Jul 2023 18:42:58 +0200 |
parent | 13195:1a59a40c6443 |
rev | line source |
---|---|
13195
1a59a40c6443
tools: Add mod2spec.sh, turns util.example into spec/util_example_spec.lua
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
1 #!/bin/sh |
1a59a40c6443
tools: Add mod2spec.sh, turns util.example into spec/util_example_spec.lua
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
2 set -eu |
1a59a40c6443
tools: Add mod2spec.sh, turns util.example into spec/util_example_spec.lua
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
3 |
1a59a40c6443
tools: Add mod2spec.sh, turns util.example into spec/util_example_spec.lua
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
4 echo "spec/${1//./_}_spec.lua" |