Test to avoid published file truncation when added to repo

This test will make sure that when a published file is added to repo, it
doesn't get truncated.