diff --git a/arkui/ace_napi_test/entry/src/main/cpp/napi/napi_test.cpp b/arkui/ace_napi_test/entry/src/main/cpp/napi/napi_test.cpp index 3b5af69d2fe768a9b505467479b8f3e8dab8dd4e..07d63eab51a16ceaabf32a40219b912730b6cdfd 100644 --- a/arkui/ace_napi_test/entry/src/main/cpp/napi/napi_test.cpp +++ b/arkui/ace_napi_test/entry/src/main/cpp/napi/napi_test.cpp @@ -1968,10 +1968,10 @@ static napi_value napiDefineClass(napi_env env, napi_callback_info info) static napi_value napiRunScriptPath(napi_env env, napi_callback_info info) { napi_value value; - const char* path = "index/page"; + const char* path = "pages/index.ets"; napi_status status = napi_run_script_path(env, path, &value); NAPI_ASSERT(env, status == napi_ok, "napi_run_script_path ok"); - NAPI_ASSERT(env, value == nullptr, "napi_run_script_path fail"); + NAPI_ASSERT(env, value != nullptr, "napi_run_script_path success"); napi_value _value; NAPI_CALL(env, napi_create_int32(env, 0, &_value)); diff --git a/arkui/ace_napi_test/entry/src/main/ets/test/NativeApiStringTest.ets b/arkui/ace_napi_test/entry/src/main/ets/test/NativeApiStringTest.ets index aed74cab15ca34c60e8e533f40eec59ff1535db5..9e93c1a12c5202f7e18df74895cff975347bdcdc 100644 --- a/arkui/ace_napi_test/entry/src/main/ets/test/NativeApiStringTest.ets +++ b/arkui/ace_napi_test/entry/src/main/ets/test/NativeApiStringTest.ets @@ -124,6 +124,19 @@ export default function nativeApiStringJsunit() { done(); }); + /** + * @tc.number SUB_ACE_BASIC_ETS_NAPI_0007 + * @tc.name napiRunScriptPath007 + * @tc.desc aceNapiEtsTest + */ + it('napiRunScriptPath007', 0, async function (done) { + console.info('napiRunScriptPath START'); + value = napitest.napiRunScriptPath(); + console.info('napiRunScriptPath testString result is: ' + JSON.stringify(value)); + expect(value).assertEqual(0) + done(); + }); + /** * @tc.number SUB_ACE_BASIC_ETS_NAPI_0008 * @tc.name napiCallThreadsafeFunction008