aboutsummaryrefslogtreecommitdiffstats
path: root/t/sort_graph.t
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-09-03 12:59:05 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-09-03 12:59:05 +0000
commitbe0cd518510a9207a122ae36e08ae2cf02b3ffe3 (patch)
treeaf1d007baa9f5aa6036e587cc40857aa353134fe /t/sort_graph.t
parent5bdf91aa1f8d4b11de820f527bb5c091735954c0 (diff)
downloadperl-URPM-be0cd518510a9207a122ae36e08ae2cf02b3ffe3.tar
perl-URPM-be0cd518510a9207a122ae36e08ae2cf02b3ffe3.tar.gz
perl-URPM-be0cd518510a9207a122ae36e08ae2cf02b3ffe3.tar.bz2
perl-URPM-be0cd518510a9207a122ae36e08ae2cf02b3ffe3.tar.xz
perl-URPM-be0cd518510a9207a122ae36e08ae2cf02b3ffe3.zip
add a test
Diffstat (limited to 't/sort_graph.t')
-rw-r--r--t/sort_graph.t14
1 files changed, 14 insertions, 0 deletions
diff --git a/t/sort_graph.t b/t/sort_graph.t
new file mode 100644
index 0000000..7f2a305
--- /dev/null
+++ b/t/sort_graph.t
@@ -0,0 +1,14 @@
+#!/usr/bin/perl
+
+use strict;
+use Test::More tests => 1;
+use URPM;
+
+
+my ($list_unsorted, $requires);
+
+$list_unsorted = [ 92, 94, 133, 137, 5826, 5828, 5830, 5831, 5836, 5839, 5842, 5844, 5845, 5848, 5849, 5851, 5856, 5859, 5864, 5873, 5882, 5883, 5890, 5892, 5894, 5895, 5897, 5900, 5913, 5915, 5916, 5917, 5924, 5925, 5926, 5928, 5929, 5932, 5936, 5937, 5938, 5943, 5948, 5953, 5955, 5956, 5959, 5960, 5961, 5962, 5964, 5968, 5969, 5970, 5974, 6008, 6009, 6010, 6012, 6110, 6115, 6119, 6120, 6127, 6129, 6132, 6135, 6164, 6165, 6166, 16841, 16842, 16844, 16845, 16890, 17009, 17011, 17013, 17156, 17157, 17169 ];
+$requires = { '17011' => [], '5883' => [], '5956' => [ 5955, 5839, 5959, 5964 ], '5897' => [], '5953' => [ 5936, 5943 ], '5894' => [ 5839 ], '17013' => [ 6135 ], '5936' => [ 5943 ], '5826' => [], '6135' => [ 5839 ], '16845' => [ 5839 ], '5974' => [ 5974, 5839, 5964 ], '5851' => [ 5856, 5849 ], '6115' => [], '92' => [ 5839, 5925, 94 ], '6010' => [ 6008, 6009, 6010 ], '5882' => [], '5970' => [ 5955, 5839, 5969 ], '16841' => [], '5926' => [ 5953, 5936, 5926, 6009, 5943, 5928 ], '17156' => [ 17157, 17156 ], '5848' => [ 5856 ], '6008' => [ 6009, 5839, 6008, 6010 ], '5842' => [ 5839, 5844 ], '16844' => [ 16845, 16841, 16842, 5839 ], '16842' => [], '5955' => [ 5970 ], '6119' => [ 6119 ], '133' => [ 5839 ], '6009' => [ 6008, 6009, 6010 ], '5831' => [], '5839' => [ 5839 ], '6165' => [ 5839 ], '5830' => [], '5960' => [ 5839, 5962 ], '5932' => [ 5953, 5936, 6009, 5932, 5938, 5943, 5928 ], '5924' => [ 5839 ], '5828' => [], '5959' => [ 5969 ], '5890' => [ 5897 ], '17169' => [ 17157 ], '5937' => [ 5936, 5943 ], '137' => [ 133, 5839, 5925 ], '5895' => [], '5892' => [], '6110' => [ 5839 ], '6127' => [], '5900' => [], '5948' => [ 5953, 5936, 6009, 5932, 5937, 5948, 5929, 5938, 5943, 5928 ], '6120' => [], '5929' => [ 5936, 5943 ], '5961' => [ 5839 ], '5964' => [ 5956, 5970, 5839 ], '6164' => [ 6119, 6120, 6164 ], '5925' => [ 5924 ], '5844' => [ 5842, 5844 ], '5864' => [], '17157' => [ 5839, 17156, 17157 ], '5969' => [], '5962' => [ 6009, 5839, 5962 ], '5913' => [ 6115, 5839, 5917 ], '5968' => [ 5970, 5839, 5959 ], '5915' => [], '6166' => [ 5839, 6165 ], '6132' => [ 5839, 6129 ], '6129' => [ 5839, 6127, 6132 ], '5938' => [ 5936, 5943 ], '5836' => [], '5943' => [ 5953, 5936, 6009, 5937, 5948, 5929, 5928 ], '5856' => [ 5897 ], '5873' => [], '5917' => [ 5839, 5856, 5917, 5849 ], '17009' => [], '94' => [ 5839 ], '5859' => [ 5856 ], '16890' => [], '5845' => [ 5851, 5848, 5856, 5849 ], '5928' => [ 5953, 5936, 5926, 6009, 5943, 5928 ], '5916' => [ 5915 ], '5849' => [ 5856 ], '6012' => [ 6012 ] };
+
+eval { URPM::sort_graph($list_unsorted, $requires) };
+ok(!$@);