diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 6d7fa52d3..197efa7c4 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -11,6 +11,7 @@ jobs: matrix: sentencecase: ['on+guess', 'on', 'off'] caseprotection: [ 'as-needed', 'strict', 'off' ] + preservequoted: [ 'false', 'true' ] steps: - uses: actions/checkout@v3 - run: echo "::version="`jq -r .version package.json` >> $GITHUB_OUTPUT @@ -34,7 +35,7 @@ jobs: - name: install node dependencies run: npm install - - run: npm test --sentence-case=${{ matrix.sentencecase }} --case-protection=${{ matrix.caseprotection }} --big + - run: npm test --sentence-case=${{ matrix.sentencecase }} --case-protection=${{ matrix.caseprotection }} --preserve-quoted=${{ matrix.preservequoted }}--big release: runs-on: ubuntu-latest diff --git a/test/tap b/test/tap index 2ced7863e..e67e070c3 100755 --- a/test/tap +++ b/test/tap @@ -10,7 +10,7 @@ const prefix = 'npm_config_' const valid = { sentence_case: ['on+guess', 'on', 'off'], case_protection: [ 'as-needed', 'strict', 'off' ], - preserveQuoted: [ 'false', 'true' ], + preserve_quoted: [ 'false', 'true' ], } const multi = ['test'] @@ -18,7 +18,7 @@ const config = Object.assign({ all: '', sentence_case: valid.sentence_case.slice(0, 1), case_protection: valid.case_protection.slice(0, 1), - preserveQuoted: valid.preserveQuoted.slice(0, 1), + preserve_quoted: valid.preserve_quoted.slice(0, 1), test: [''], snapshot: '', unabbreviations: path.resolve(path.join(__dirname, '..', 'unabbrev.json')), @@ -94,11 +94,11 @@ for (const bibfile of testcases) { for (const sentence_case of config.sentence_case) { for (const case_protection of config.case_protection) { - for (const preserveQuoted of config.preserveQuoted) { + for (const preserve_quoted of config.preserve_quoted) { if (config.toobig.includes(basename)) continue const unabbreviate = config.unabbreviate.includes(basename); - const settings = `sentencecase=${sentence_case}^caseprotection=${case_protection}${preserveQuoted === 'true' ? '^preservequoted' : ''}`; + const settings = `sentencecase=${sentence_case}^caseprotection=${case_protection}${preserve_quoted === 'true' ? '^preservequoted' : ''}`; ; ((bibfile, options, name, snapshot) => { tap.test(name, async t => { @@ -113,7 +113,7 @@ for (const bibfile of testcases) { { caseProtection: case_protection === 'off' ? false : case_protection, sentenceCase: sentence_case.startsWith('on'), - preserveQuoted: preserveQuoted === 'true', + preserve_quoted: preserve_quoted === 'true', guessAlreadySentenceCased: sentence_case.endsWith('guess'), unabbreviations: unabbreviate && config.unabbreviations, strings: unabbreviate && config.strings,