Skip to content

Commit

Permalink
add new test
Browse files Browse the repository at this point in the history
  • Loading branch information
domenkozar committed Nov 13, 2012
1 parent 2a3f372 commit 1099280
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions bacula.aug
Expand Up @@ -101,6 +101,12 @@ module Bacula =
{"Pid Directory" = "kaki sd"} {"Pid Directory" = "kaki sd"}
} }


(* edge case in key *)
test Bacula.lns get "Storage {\n Maximum Concurrent Jobs = 1\n}" =
{"@block" = "Storage"
{"Name" = "kaki-sd" }
}

(* semicolon *) (* semicolon *)
test Bacula.lns get "Storage {\n Name = kaki-sd;\n}" = test Bacula.lns get "Storage {\n Name = kaki-sd;\n}" =
{"@block" = "Storage" {"@block" = "Storage"
Expand All @@ -121,7 +127,7 @@ module Bacula =
} }
{ "#comment" = "just a comment"} } { "#comment" = "just a comment"} }


(* TODO: comment after } *) (* comment after } *)
test Bacula.lns get "Storage {\n Name = kaki-sd\n}\n # just a comment\n" = test Bacula.lns get "Storage {\n Name = kaki-sd\n}\n # just a comment\n" =
{"@block" = "Storage" {"@block" = "Storage"
{"Name" = "kaki-sd" {"Name" = "kaki-sd"
Expand All @@ -143,7 +149,7 @@ module Bacula =
{"#comment" = "just a comment" } {"#comment" = "just a comment" }
} }


(* TODO: include statements *) (* include statements *)
test Bacula.lns get "Storage {\n @/etc/foo.conf\n}" = test Bacula.lns get "Storage {\n @/etc/foo.conf\n}" =
{"@block" = "Storage" {"@block" = "Storage"
{"@include" = "/etc/foo.conf"} {"@include" = "/etc/foo.conf"}
Expand Down Expand Up @@ -192,10 +198,11 @@ module Bacula =
} }
} }


(* TODO: include top level statements *) (* include top level statements *)
test Bacula.lns get "@/etc/foo.conf\n" = test Bacula.lns get "@/etc/foo.conf\n" =
{"@include" = "/etc/foo.conf"} {"@include" = "/etc/foo.conf"}



(* Blocks can follow each other without \n *) (* Blocks can follow each other without \n *)
test Bacula.lns get "Storage{Name = kaki sd}Storage{Name = kaki-sd}" = test Bacula.lns get "Storage{Name = kaki sd}Storage{Name = kaki-sd}" =
{ "@block" = "Storage" { "@block" = "Storage"
Expand Down

0 comments on commit 1099280

Please sign in to comment.