1 module Test_aptpreferences =
3 let conf ="Explanation: Backport packages are never prioritary
5 Pin: release a=backports
9 Explanation: My packages are the most prioritary
11 Pin: release l=Raphink, v=3.0
19 Pin: origin packages.linuxmint.com
23 test AptPreferences.lns get conf =
25 { "Explanation" = "Backport packages are never prioritary" }
28 { "a" = "backports" } }
29 { "Pin-Priority" = "100" } }
31 { "#comment" = "This is a comment" }
32 { "Explanation" = "My packages are the most prioritary" }
37 { "Pin-Priority" = "700" } }
39 { "Package" = "liferea-data" }
41 { "version" = "1.4.26-4" } }
42 { "Pin-Priority" = "600" } }
46 { "origin" = "packages.linuxmint.com" } }
47 { "Pin-Priority" = "700" } }
49 (*************************************************************************)
51 test AptPreferences.lns put "\n" after
52 set "/1/Package" "something-funny";
53 set "/1/Pin" "version";
54 set "/1/Pin/version" "1.2.3-4";
55 set "/1/Pin-Priority" "2000"
57 Package: something-funny
62 (* Test: AptPreferences.pin
63 Spaces in origins are valid *)
64 test AptPreferences.pin get "Pin: release o=Quantum GIS project\n" =
66 { "o" = "Quantum GIS project" } }