Skip to content

Add unit test coverage for TSqlParser facade overloads, builder, and CLI #28

Closed

Description

@fupacat

Problem

In TSqlParser.java, line coverage is currently at 33.7% (34 uncovered lines out of 59).
The uncovered paths include:

  1. TSqlParser.parse(Reader) and TSqlParser.parse(Reader, SqlVersion)
  2. TSqlParser.Builder (initialQuotedIdentifiers, sqlVersion, build)
  3. isInitialQuotedIdentifiersOn() and getTargetVersion() getters
  4. Parser error handling branch when an exception occurs inside parseScript
  5. Standalone main(String[] args) CLI entry point (help output, string input, -f file argument, error exit paths).

Proposed Changes

  • Expand TSqlParserFacadeTest to test all Reader overloads, the fluent Builder, and getters.
  • Add test coverage for TSqlParser.main verifying argument handling (-h, raw SQL, invalid SQL, and non-existent files).

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions