2019-01-15 16:45:41 -03:00
|
|
|
using LibSernatur.Misc;
|
2019-01-15 16:39:41 -03:00
|
|
|
|
2019-01-15 16:45:41 -03:00
|
|
|
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);
|
2019-01-15 16:39:41 -03:00
|
|
|
|
2019-01-15 16:45:41 -03:00
|
|
|
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);
|
2019-01-15 16:39:41 -03:00
|
|
|
|
2019-01-15 16:45:41 -03:00
|
|
|
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);
|
2019-01-15 16:39:41 -03:00
|
|
|
}
|
2019-01-15 16:45:41 -03:00
|
|
|
catch (Error e) {
|
|
|
|
error (e.message);
|
|
|
|
}
|
|
|
|
return 0;
|
2019-01-15 16:39:41 -03:00
|
|
|
}
|