Skip to content

Add Compatibility test#12

Merged
fallenwood merged 4 commits intomasterfrom
compatibility
Jan 31, 2026
Merged

Add Compatibility test#12
fallenwood merged 4 commits intomasterfrom
compatibility

Conversation

@fallenwood
Copy link
Copy Markdown
Owner

This pull request introduces a new Rust baseline project and a set of template test cases for compatibility testing, along with corresponding template files and initial C# rewrite implementations for some cases. The main focus is to set up a framework for comparing template rendering between Rust (using minijinja) and C# (using MiniJinja). The most important changes are as follows:

Baseline Rust Project Setup:

  • Added a new Rust project in compatibility/baseline with a Cargo.toml specifying minijinja as a dependency, and a .gitignore to exclude build artifacts. [1] [2]
  • Implemented src/main.rs to execute and render 12 different template cases using minijinja, each demonstrating a different template feature (e.g., inheritance, loops, filters, macros).

Template Test Cases:

  • Added template files under compatibility/cases/case0 through case11, each illustrating a specific template feature such as variable interpolation, inheritance, loops, filters, conditionals, macros, and nested loops. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]

Editor Configuration:

  • Updated .editorconfig to specify that .txt files should not have a final newline, ensuring consistency in template file formatting.

C# Rewrite Implementations:

  • Added initial C# implementations for Case0, Case1, and Case10 in compatibility/rewrite/, each loading the corresponding template(s) and rendering them using the MiniJinja library, mirroring the Rust test cases. [1] [2] [3]

@fallenwood fallenwood merged commit 5625534 into master Jan 31, 2026
1 check passed
@fallenwood fallenwood deleted the compatibility branch January 31, 2026 13:46
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.99%. Comparing base (db8c0ab) to head (5372b92).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #12   +/-   ##
=======================================
  Coverage   83.99%   83.99%           
=======================================
  Files          10       10           
  Lines        3161     3161           
  Branches      544      544           
=======================================
  Hits         2655     2655           
  Misses        361      361           
  Partials      145      145           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants