diff options
author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-04-10 21:37:29 +0000 |
---|---|---|
committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-04-10 21:37:29 +0000 |
commit | 0507486ad35189c557903d0c78bd1bbd7d43b967 (patch) | |
tree | 3555b793c684ec009dd906b9d8c28212ba242fd7 /examples | |
parent | ae4b12e2cd337007f32c6bdb51924969a1bddc48 (diff) | |
download | puppet-0507486ad35189c557903d0c78bd1bbd7d43b967.tar.gz puppet-0507486ad35189c557903d0c78bd1bbd7d43b967.tar.xz puppet-0507486ad35189c557903d0c78bd1bbd7d43b967.zip |
Fixing #117. If only one value was provided, then it was not placed in an array, yet AST::Selector expected an array. The grammar needs to have some abstraction added or something, because I seem to have encountered this bug for every ast type that supports arrays internally.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1097 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'examples')
-rw-r--r-- | examples/code/snippets/singleselector.pp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/examples/code/snippets/singleselector.pp b/examples/code/snippets/singleselector.pp new file mode 100644 index 000000000..520a14017 --- /dev/null +++ b/examples/code/snippets/singleselector.pp @@ -0,0 +1,22 @@ +$value1 = "" +$value2 = true +$value3 = false +$value4 = yay + +$test = "yay" + +$mode1 = $value1 ? { + "" => 755 +} + +$mode2 = $value2 ? { + true => 755 +} + +$mode3 = $value3 ? { + default => 755 +} + +file { "/tmp/singleselector1": ensure => file, mode => $mode1 } +file { "/tmp/singleselector2": ensure => file, mode => $mode2 } +file { "/tmp/singleselector3": ensure => file, mode => $mode3 } |