mirror of
https://github.com/janet-lang/janet
synced 2025-04-29 06:03:21 +00:00
parent
0ca0180f27
commit
e0fe8476aa
@ -218,6 +218,10 @@ static Janet janet_core_expand_path(int32_t argc, Janet *argv) {
|
|||||||
}
|
}
|
||||||
dot_count = 0;
|
dot_count = 0;
|
||||||
} else {
|
} else {
|
||||||
|
while (dot_count > 0) {
|
||||||
|
--dot_count;
|
||||||
|
*print++ = '.';
|
||||||
|
}
|
||||||
dot_count = -1;
|
dot_count = -1;
|
||||||
*print++ = *scan;
|
*print++ = *scan;
|
||||||
}
|
}
|
||||||
|
@ -130,4 +130,9 @@
|
|||||||
|
|
||||||
(assert (not (string/find "\r" (get ((fiber/getenv (fiber/current)) 'cond) :doc))) "no \\r in doc strings")
|
(assert (not (string/find "\r" (get ((fiber/getenv (fiber/current)) 'cond) :doc))) "no \\r in doc strings")
|
||||||
|
|
||||||
|
# module/expand-path regression
|
||||||
|
(with-dyns [:syspath ".janet/.janet"]
|
||||||
|
(assert (= (string (module/expand-path "hello" ":sys:/:all:.janet"))
|
||||||
|
".janet/.janet/hello.janet") "module/expand-path 1"))
|
||||||
|
|
||||||
(end-suite)
|
(end-suite)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user