Skip to content

Commit 11e4193

Browse files
authored
Merge pull request #55 from ggtakec/fix/tests
Fixed some test codes in tests directory
2 parents 1007759 + 269a4d0 commit 11e4193

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

tests/smoke_test_esm.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ import url from 'url';
7878
const tryPaths = [
7979
path.join(__dirname, '..', 'index.js'),
8080
path.join(__dirname, '..', 'lib', 'index.js'),
81-
path.join(__dirname, '..', 'build', 'Release', 'k2hash.node') // dynamic import of .node may not work; this is just a try
81+
path.join(__dirname, '..', 'build', 'Release', 'chmpx.node') // dynamic import of .node may not work; this is just a try
8282
];
8383

8484
for(const tgPath of tryPaths){

tests/smoke_test_ts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
// correctly(pass type checks).
3030
// Only compile(type check) without executing(tsc --noEmit).
3131
// - Verify that type representations(constructible/callable
32-
// k2hash, classes within namespaces, etc.) are provided
32+
// chmpx, classes within namespaces, etc.) are provided
3333
// to users correctly.
3434
//
3535
// [Outline]

tests/test.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ CheckCommands()
184184
#==========================================================
185185
PrintUsage()
186186
{
187-
echo "Usage: $1 [--debuglevel(-d) INFO/WARN/ERR/SILENT(default)] [-logfile(-l) <path>] Command"
187+
echo "Usage: $1 [--debuglevel(-d) INFO/ERR(default)] [-logfile(-l) <path>] [--libdebuglevel(-ld) DUMP/INFO/WARN/ERR/SILENT(default)] [--liblogfile(-ll) <path>] [--commonjs(-cjs)] Command"
188188
echo ""
189189
echo "Command: chmpx_slave Slave test"
190190
echo " chmpx_server Server test"
@@ -264,12 +264,12 @@ while [ $# -ne 0 ]; do
264264
fi
265265
shift
266266
if [ $# -eq 0 ]; then
267-
PRNERR "--libdebuglevel(-ld) option needs parameter(info/warn/err/silent)"
267+
PRNERR "--libdebuglevel(-ld) option needs parameter(dump/info/warn/err/silent)"
268268
exit 1
269269
fi
270270
if echo "$1" | grep -q -i -e "^dmp$" -e "^dump$"; then
271271
LIB_DEBUG_MODE="DUMP"
272-
elif echo "$1" | grep -q -i -e "^inf$" -e "^info$"; then
272+
elif echo "$1" | grep -q -i -e "^inf$" -e "^info$" -e "^msg$"; then
273273
LIB_DEBUG_MODE="INFO"
274274
elif echo "$1" | grep -q -i -e "^wan$" -e "^warn$" -e "^warning$"; then
275275
LIB_DEBUG_MODE="WAN"
@@ -340,7 +340,7 @@ if [ -z "${LIB_DEBUG_MODE}" ] && [ -n "${CHMDBGMODE}" ]; then
340340
# other than "SILENT"
341341
if echo "${CHMDBGMODE}" | grep -q -i -e "^dmp$" -e "^dump$"; then
342342
LIB_DEBUG_MODE="DUMP"
343-
elif echo "${CHMDBGMODE}" | grep -q -i -e "^inf$" -e "^info$"; then
343+
elif echo "${CHMDBGMODE}" | grep -q -i -e "^inf$" -e "^info$" -e "^msg$"; then
344344
LIB_DEBUG_MODE="INFO"
345345
elif echo "${CHMDBGMODE}" | grep -q -i -e "^wan$" -e "^warn$" -e "^warning$"; then
346346
LIB_DEBUG_MODE="WAN"
@@ -597,7 +597,7 @@ fi
597597
#
598598
# Run command
599599
#
600-
PRNTITLE "Test : ${ONE_COMMAND}${PRINT_CJS_MODE}"
600+
PRNTITLE "Test : ${PRINT_CJS_MODE}"
601601

602602
PRNINFO "Run : NODE_PATH=${CHMPX_NODE_PATH} TESTS_PATH=${TESTSDIR} SCRIPT_TYPE=${SCRIPT_TYPE} CHMDBGMODE=${LIB_DEBUG_MODE} CHMDBGFILE=${LIB_DEBUG_LOG} node ${ESM_IMPORT_OPT} ${ESM_EXPR_OPT} ${MOCHA_BIN} --extensions ts ${TEST_FILE_DIR_PATH}/${CMD_PREFIX}${COMMAND}${TEST_FILE_SUFFIX}"
603603

0 commit comments

Comments
 (0)