未验证 提交 7db837ce 编写于 作者: O openharmony_ci 提交者: Gitee

!9753 Add napiRunScriptPath007

Merge pull request !9753 from yaochaonan/addnewcase
......@@ -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));
......
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册