From patchwork Mon Dec 15 08:46:45 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yousong Zhou X-Patchwork-Id: 421033 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4973D140082 for ; Mon, 15 Dec 2014 20:26:35 +1100 (AEDT) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id E964E28AFC1; Mon, 15 Dec 2014 10:23:10 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 72A3528AE0F for ; Mon, 15 Dec 2014 10:23:02 +0100 (CET) X-policyd-weight: using cached result; rate: -8.5 Received: from mail-pa0-f47.google.com (mail-pa0-f47.google.com [209.85.220.47]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Mon, 15 Dec 2014 10:23:02 +0100 (CET) Received: by mail-pa0-f47.google.com with SMTP id kq14so11487783pab.34 for ; Mon, 15 Dec 2014 01:24:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=wTQrHMgDnpPHQDI1TdnMDqbWIW/Btnx49CyoMQP3qmc=; b=lQteNZZKCUMpH9qRsehRhNGU8DagbuY2EszUCbMXBLW2Xo7/GY6+h+9BSgxLBJurox OcxfzpwfaaNSzs6yv89O4J6KRKomQjUIHkcF4RQBZEA5PpKamH+QB97DlK5ReVLs9uJl w9hY7XLA6A0+SdVBvtU/mYg2myuuPmbIIDED6rIlCaF8cwAjzTb1+Lji2qa5d8lhph3v TsuHZmKEneqdd9gWBXwlJHIMyf7zsna9i3zc92PMQWOoNzmv1aGtjhByazz8q54xx+EF zyH3B9q+rQxijdsAoneMaDB6bBAnN7ej0W8qjmsL1m1Q0qI+93unBPSvxDPlvxJYURCs ZBvw== X-Received: by 10.68.200.68 with SMTP id jq4mr12466447pbc.30.1418635488080; Mon, 15 Dec 2014 01:24:48 -0800 (PST) Received: from debian.lan ([103.29.140.56]) by mx.google.com with ESMTPSA id rh11sm8631536pdb.66.2014.12.15.01.24.45 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Dec 2014 01:24:47 -0800 (PST) From: Yousong Zhou To: nbd@openwrt.org Date: Mon, 15 Dec 2014 16:46:45 +0800 Message-Id: <1418633213-50491-5-git-send-email-yszhou4tech@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1418633213-50491-1-git-send-email-yszhou4tech@gmail.com> References: <1418633213-50491-1-git-send-email-yszhou4tech@gmail.com> Cc: openwrt-devel@lists.openwrt.org Subject: [OpenWrt-Devel] [PATCH 04/12] tests: add test coverage for `uci batch' command. X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" Signed-off-by: Yousong Zhou --- test/references/batch_set.result | 9 +++++++++ test/tests.d/060_batch | 17 +++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 test/references/batch_set.result create mode 100644 test/tests.d/060_batch diff --git a/test/references/batch_set.result b/test/references/batch_set.result new file mode 100644 index 0000000..c726bad --- /dev/null +++ b/test/references/batch_set.result @@ -0,0 +1,9 @@ + +config section 'SEC0' + option option0 'value0' + option option1 '"Hello, + World"' + +config section 'SEC1' + option option0 'value1' + diff --git a/test/tests.d/060_batch b/test/tests.d/060_batch new file mode 100644 index 0000000..49d15e4 --- /dev/null +++ b/test/tests.d/060_batch @@ -0,0 +1,17 @@ +test_batch_set() +{ + touch ${CONFIG_DIR}/batch_set + + ${UCI} batch <