119b4f0dcSEd Maste# 219b4f0dcSEd Maste# Copyright 2018 Yuri Pankov 319b4f0dcSEd Maste# 419b4f0dcSEd Maste# Redistribution and use in source and binary forms, with or without 519b4f0dcSEd Maste# modification, are permitted provided that the following conditions 619b4f0dcSEd Maste# are met: 719b4f0dcSEd Maste# 1. Redistributions of source code must retain the above copyright 819b4f0dcSEd Maste# notice, this list of conditions and the following disclaimer. 919b4f0dcSEd Maste# 2. Redistributions in binary form must reproduce the above copyright 1019b4f0dcSEd Maste# notice, this list of conditions and the following disclaimer in the 1119b4f0dcSEd Maste# documentation and/or other materials provided with the distribution. 1219b4f0dcSEd Maste# 1319b4f0dcSEd Maste# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 1419b4f0dcSEd Maste# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1519b4f0dcSEd Maste# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1619b4f0dcSEd Maste# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 1719b4f0dcSEd Maste# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1819b4f0dcSEd Maste# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 1919b4f0dcSEd Maste# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2019b4f0dcSEd Maste# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2119b4f0dcSEd Maste# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2219b4f0dcSEd Maste# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2319b4f0dcSEd Maste# SUCH DAMAGE. 2419b4f0dcSEd Maste# 2519b4f0dcSEd Maste# 2619b4f0dcSEd Maste 2719b4f0dcSEd Masteatf_test_case unlink_dash_filename 2819b4f0dcSEd Masteunlink_dash_filename_head() 2919b4f0dcSEd Maste{ 3019b4f0dcSEd Maste atf_set "descr" "unlink correctly handles -filename" 3119b4f0dcSEd Maste} 3219b4f0dcSEd Masteunlink_dash_filename_body() 3319b4f0dcSEd Maste{ 3419b4f0dcSEd Maste touch -- foo bar -foo -bar 3519b4f0dcSEd Maste atf_check -s exit:0 unlink foo 3619b4f0dcSEd Maste atf_check -s exit:0 unlink -- bar 3719b4f0dcSEd Maste atf_check -s exit:0 unlink -foo 3819b4f0dcSEd Maste atf_check -s exit:0 unlink -- -bar 3919b4f0dcSEd Maste} 4019b4f0dcSEd Maste 4119b4f0dcSEd Masteatf_init_test_cases() 4219b4f0dcSEd Maste{ 4319b4f0dcSEd Maste atf_add_test_case unlink_dash_filename 4419b4f0dcSEd Maste} 45