commit 1d8a76e060f610a9db20cf1bdd4ff95dddba9309
Author: Adrien Thebo <git@somethingsinistral.net>
Date:   Thu Mar 14 13:42:22 2013 -0700

    (#7680) Add acceptance test for file links => follow

--- /dev/null
+++ b/acceptance/tests/resource/file/ticket_7680-follow-symlinks.rb
@@ -0,0 +1,33 @@
+test_name "#7680: 'links => follow' should use the file source content"
+confine :except, :platform => 'windows'
+
+agents.each do |agent|
+
+  step "Create file content"
+  real_source = agent.tmpfile('follow_links_source')
+  dest        = agent.tmpfile('follow_links_dest')
+  symlink     = agent.tmpfile('follow_links_symlink')
+
+  on agent, "echo 'This is the real content' > #{real_source}"
+  on agent, "ln -sf #{real_source} #{symlink}"
+
+  manifest = <<-MANIFEST
+    file { '#{dest}':
+      ensure => file,
+      source => '#{symlink}',
+      links  => follow,
+    }
+  MANIFEST
+  apply_manifest_on(agent, manifest, :trace => true)
+
+  on agent, "cat #{dest}" do
+    assert_match /This is the real content/, stdout
+  end
+
+  step "Cleanup"
+  [real_source, dest, symlink].each do |file|
+    on agent, "rm -f '#{file}'"
+  end
+end
+
+
