From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 31557 invoked from network); 10 Aug 2020 08:09:32 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 10 Aug 2020 08:09:32 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=Sender:List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Content-Transfer-Encoding:Content-Type: MIME-Version:Message-ID:Subject:To:From:Date:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References; bh=5FN3n75ZWU5yaAyV42nt6gxLyuMmeCwcwgFQ+2t61+k=; b=uPlWrIrFdJzwTHHruZigF0G466 z7GbEsAZe6mRXCyWKgw5Z35DR1qBSplEk7c7E/aEP49p0cxaaTFOgpMjdCDxxlPrPpNCr5HbrGA4i rhzJS4cbBM2txhoT0KqrDmagJL0thvEhtqXqbMU1eU/MM9s7xeSq6tPQy0N2/sxAhUTIhT15tgBR9 bU0VgpsQd0PgGyyBPEw58EYZUJsGRqzmkY9NeafdfvpNwHRlkys02OpVqP4wKneQuhmwlUoEejIsE QlSkgsMoEEb2C3fy9Ga22v96T74EglXjfrvP4Qpxv+jNuh7jwSchIPDYOgPVh7qQMcypiAQowqQLK O8Uquy2Q==; Received: from authenticated user by zero.zsh.org with local id 1k52s4-000H5Y-3r; Mon, 10 Aug 2020 08:09:28 +0000 Authentication-Results: zsh.org; iprev=pass (wout4-smtp.messagingengine.com) smtp.remote-ip=64.147.123.20; dkim=pass header.d=daniel.shahaf.name header.s=fm1 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm3 header.a=rsa-sha256 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:59503) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) id 1k52rn-000Gvp-8D; Mon, 10 Aug 2020 08:09:13 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 57F88C0C; Mon, 10 Aug 2020 04:09:03 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 10 Aug 2020 04:09:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=date:from:to:subject:message-id :mime-version:content-type:content-transfer-encoding; s=fm1; bh= 5FN3n75ZWU5yaAyV42nt6gxLyuMmeCwcwgFQ+2t61+k=; b=UJI2bU0fr6r+5635 9XRQjC6bMKn0dZ/64MbV+5tEtDHqpZnRJJVY/rL73WdT6S5jfnvHPCJG3HAEHxWP BdCvt6m2QXDfnvC9lJT7D7ZU0rL/3U03I3dy4IgGQMeaSTVDGZbsTD3n2LPTz+9P uq4q08olAPAL7oqT9bO6il0YdOnh9k8TsdjnAiny3wLw2GpDMrYsM5MB9SiFL5Qt oYeQt8Rv6NBYN2vN4aaFPWZJCGRDEzFH7B4mX00pdclV9f+6gNeJ4X4CSZiLAynF wTTV1pcEF5l6SnKqDUmRM8iVls6PTx9sd7d4jrFNLoSlaNY17XeXCppkUP5Z+/kR YMXtZQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=5FN3n7 5ZWU5yaAyV42nt6gxLyuMmeCwcwgFQ+2t61+k=; b=meKxtTzVzQuwj90ACaWEum /+SLiGzns4M7ruUuM1rwUn+Nn977lTTOPsT9rEEaY/9EOO+UrtzOHZoIHZH2mIZn 3aDEIi/r7rHFBfBDCRvfgCCfHMAhsuRd5FLgnlRiO+bkcOQ+ZCz4HKch+0qhuoF7 DFj2uJZW4gRNzboKVjTDIl131r2omtG8474f05cvcscY7EYZUGDIBEK8quz/8pdS H/XGA/bKOaNu+rMUwV9QWQJFWV/j10b7PFjceu2h6wuzg+WAf0ZrvxXmXd24zJ3j 96QxjQvxqNk69MRiWJZqb0u0KV0rFgwlQUOxxiNbDzKZjypsAhRQTU6uldEVwheQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrkeekucetufdoteggodetrfdotffvucfrrh hofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgenuceurghi lhhouhhtmecufedttdenucenucfjughrpeffhffvuffkofggtgfgsehtqhdttdertdejne cuhfhrohhmpeffrghnihgvlhcuufhhrghhrghfuceougdrshesuggrnhhivghlrdhshhgr hhgrfhdrnhgrmhgvqeenucggtffrrghtthgvrhhnpeehgfeihfehjeehheefteejjeffue ekgeelveegleelveduheetudefvdejiefgieenucfkphepjeelrddukedvrdejfedrfedv necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepugdrsh esuggrnhhivghlrdhshhgrhhgrfhdrnhgrmhgv X-ME-Proxy: Received: from tarpaulin.shahaf.local2 (bzq-79-182-73-32.red.bezeqint.net [79.182.73.32]) by mail.messagingengine.com (Postfix) with ESMTPA id 7728A3280063 for ; Mon, 10 Aug 2020 04:09:02 -0400 (EDT) Received: from tarpaulin.shahaf.local2 (localhost [IPv6:::1]) by tarpaulin.shahaf.local2 (Postfix) with ESMTP id 4BQ7s741Mbz1Qd for ; Mon, 10 Aug 2020 08:08:59 +0000 (UTC) Date: Mon, 10 Aug 2020 08:08:57 +0000 From: Daniel Shahaf To: zsh-workers@zsh.org Subject: is-at-least false positive (5.8.0.2 / 5.8) Message-ID: <20200810080857.26d160ee@tarpaulin.shahaf.local2> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Zsh-Org-Should-ARC-Sign: true X-Seq: 47314 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Archived-At: Sender: Sympa Owner Actual behaviour: % is-at-least 5.8.0.2 5.8 && echo yes || echo no=20 yes % is-at-least 5.8.0.2 5.8.0.0 && echo yes || echo no no Expected behaviour: Both commands should have printed "no". Smoke test and regression test attached. Cheers, Daniel diff --git a/Test/Z01is-at-least.ztst b/Test/Z01is-at-least.ztst new file mode 100644 index 000000000..37952cdf6 --- /dev/null +++ b/Test/Z01is-at-least.ztst @@ -0,0 +1,23 @@ +%prep + autoload -Uz is-at-least + +%test + + versions=3D( + 1 1.1 1.1.1 1.2 1.2.1 + 2 2.1 2.1.1 2.2 2.2.1 + 3 3.1 3.1.1 3.2 3.2.1 + ) + for (( i =3D 1; i <=3D $#versions; ++i)); do + for (( j =3D i+1; j <=3D $#versions; ++j)); do + is-at-least $versions[i] $versions[j] || echo "$versions[i] =E2=89= =B0 $versions[j]" + { ! is-at-least $versions[j] $versions[i] } || echo "$versions[j] = =E2=89=A4 $versions[i]" + done + done +0:is-at-least smoke test + + is-at-least 5.8.0.2 5.8 +1f:regression tests: Two trailing zeroes are filled in +# TODO: When fixing this, extend the smoke test to cover this. + +%clean