Internal Test: Verifies that the correct pattern string is returned for rules created with both FromTo() and Pattern(), including complex syntax.

ID: 965

				
					using uCalcSoftware;

var uc = new uCalc();
var t = uc.NewTransformer();

// Rule created with FromTo
var rule1 = t.FromTo("Key: {@Number:val}", "{val}");

// Rule created with Pattern
var rule2 = t.Pattern("<{tag}>{content}</{tag}>");

Console.WriteLine($"Rule 1 Pattern: {rule1.Pattern}");
Console.WriteLine($"Rule 2 Pattern: {rule2.Pattern}");
				
			
Rule 1 Pattern: Key: {@Number:val}
Rule 2 Pattern: <{tag}>{content}</{tag}>
				
					#include <iostream>
#include "uCalc.h"

using namespace std;
using namespace uCalcSoftware;

int main() {
   uCalc uc;
   auto t = uc.NewTransformer();

   // Rule created with FromTo
   auto rule1 = t.FromTo("Key: {@Number:val}", "{val}");

   // Rule created with Pattern
   auto rule2 = t.Pattern("<{tag}>{content}</{tag}>");

   cout << "Rule 1 Pattern: " << rule1.Pattern() << endl;
   cout << "Rule 2 Pattern: " << rule2.Pattern() << endl;
}
				
			
Rule 1 Pattern: Key: {@Number:val}
Rule 2 Pattern: <{tag}>{content}</{tag}>
				
					Imports System
Imports uCalcSoftware
Public Module Program
   Public Sub Main()
      Dim uc As New uCalc()
      Dim t = uc.NewTransformer()
      
      '// Rule created with FromTo
      Dim rule1 = t.FromTo("Key: {@Number:val}", "{val}")
      
      '// Rule created with Pattern
      Dim rule2 = t.Pattern("<{tag}>{content}</{tag}>")
      
      Console.WriteLine($"Rule 1 Pattern: {rule1.Pattern}")
      Console.WriteLine($"Rule 2 Pattern: {rule2.Pattern}")
   End Sub
End Module
				
			
Rule 1 Pattern: Key: {@Number:val}
Rule 2 Pattern: <{tag}>{content}</{tag}>