25 lines
633 B
Vala
25 lines
633 B
Vala
using LibSernatur.Misc;
|
|
|
|
public static int main (string[] args) {
|
|
try {
|
|
Rut rut = new Rut ("18166316-2");
|
|
assert (rut.get_clean_rut () == "181663162");
|
|
assert (rut.get_rut () == "18.166.316-2");
|
|
assert (rut.type () == Rut.Type.RUN);
|
|
|
|
rut = new Rut ("20380508-k");
|
|
assert (rut.get_clean_rut () == "20380508K");
|
|
assert (rut.get_rut () == "20.380.508-K");
|
|
assert (rut.type () == Rut.Type.RUN);
|
|
|
|
rut = new Rut ("50380508-1");
|
|
assert (rut.get_clean_rut () == "503805081");
|
|
assert (rut.get_rut () == "50.380.508-1");
|
|
assert (rut.type () == Rut.Type.RUT);
|
|
}
|
|
catch (Error e) {
|
|
error (e.message);
|
|
}
|
|
return 0;
|
|
}
|