From c25cfc5773c3292a925d1c008494d7a071f7ca3c Mon Sep 17 00:00:00 2001 From: LongYinan Date: Fri, 24 Dec 2021 11:39:53 +0800 Subject: [PATCH] test(cli): add android target triple test --- ava.config.js | 2 +- cli/src/__test__/parse-triple.spec.ts | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/ava.config.js b/ava.config.js index 0490d102..78664d4b 100644 --- a/ava.config.js +++ b/ava.config.js @@ -1,6 +1,6 @@ const configuration = { extensions: ['ts', 'tsx'], - files: ['examples/**/__test__/**/*.spec.ts'], + files: ['cli/**/*.spec.ts', 'examples/**/__test__/**/*.spec.ts'], require: ['ts-node/register/transpile-only'], environmentVariables: { TS_NODE_PROJECT: './examples/tsconfig.json', diff --git a/cli/src/__test__/parse-triple.spec.ts b/cli/src/__test__/parse-triple.spec.ts index 2a35d945..bedae3ca 100644 --- a/cli/src/__test__/parse-triple.spec.ts +++ b/cli/src/__test__/parse-triple.spec.ts @@ -93,6 +93,26 @@ const triples = [ raw: 'armv7-unknown-linux-gnueabihf', } as const, }, + { + name: 'aarch64-linux-android', + expected: { + abi: null, + arch: 'arm64', + platform: 'android', + platformArchABI: 'android-arm64', + raw: 'aarch64-linux-android', + }, + } as const, + { + name: 'armv7-linux-androideabi', + expected: { + abi: 'eabi', + arch: 'arm', + platform: 'android', + platformArchABI: 'android-arm-eabi', + raw: 'armv7-linux-androideabi', + }, + } as const, ] for (const triple of triples) {