-
Notifications
You must be signed in to change notification settings - Fork 3
/
testversions.dpr
29 lines (23 loc) · 1.27 KB
/
testversions.dpr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
program testversions;
uses sysutils,versions;
var
epoch : integer;
upstreamversion : string;
debianrevision : string;
result : string;
begin
splitversion('12345',epoch,upstreamversion,debianrevision);
if (epoch=0) and (upstreamversion='12345') and (debianrevision='0') then result := 'good' else result := 'bad';
writeln(inttostr(epoch)+' '+upstreamversion+' '+debianrevision+' '+result);
splitversion('1:12345',epoch,upstreamversion,debianrevision);
if (epoch=1) and (upstreamversion='12345') and (debianrevision='0') then result := 'good' else result := 'bad';
writeln(inttostr(epoch)+' '+upstreamversion+' '+debianrevision+' '+result);
splitversion('1:12345-1+rpi1',epoch,upstreamversion,debianrevision);
if (epoch=1) and (upstreamversion='12345') and (debianrevision='1+rpi1') then result := 'good' else result := 'bad';
writeln(inttostr(epoch)+' '+upstreamversion+' '+debianrevision+' '+result);
splitversion('12345-1+rpi1',epoch,upstreamversion,debianrevision);
if (epoch=0) and (upstreamversion='12345') and (debianrevision='1+rpi1') then result := 'good' else result := 'bad';
writeln(inttostr(epoch)+' '+upstreamversion+' '+debianrevision+' '+result);
writeln(compareversion('12fuck','1234fuck'));
writeln(compareversion('0.10.3-2','0.10.3+svn61-1'));
end.