add new freespace test
Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/dfba723e Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/dfba723e Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/dfba723e Branch: refs/heads/develop Commit: dfba723eae4a3285e0a1ecd1a8d865e765449345 Parents: 98c44ca Author: Justin Mclean <jmcl...@apache.org> Authored: Fri Jul 25 12:28:50 2014 +1000 Committer: Justin Mclean <jmcl...@apache.org> Committed: Fri Jul 25 12:28:50 2014 +1000 ---------------------------------------------------------------------- ant_on_air/tests/freespace.xml | 67 +++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/dfba723e/ant_on_air/tests/freespace.xml ---------------------------------------------------------------------- diff --git a/ant_on_air/tests/freespace.xml b/ant_on_air/tests/freespace.xml new file mode 100644 index 0000000..fbac1ea --- /dev/null +++ b/ant_on_air/tests/freespace.xml @@ -0,0 +1,67 @@ +<?xml version="1.0"?> +<!-- + + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +--> + +<project name="freespace" basedir="." default="test"> + + <target name="test"> + <!-- likely to be true --> + <condition property="just_right" value="success"> + <and> + <hasfreespace partition="/" needed="1K" /> + <hasfreespace partition="/" needed="10K" /> + <hasfreespace partition="/" needed="100K" /> + <hasfreespace partition="/" needed="1M" /> + <hasfreespace partition="/" needed="10M" /> + <hasfreespace partition="/" needed="100M" /> + <hasfreespace partition="/" needed="1G" /> + </and> + </condition> + + <echo>Has free space: ${just_right} should be 'success'</echo> + <fail message="and test 1 failed" > + <condition> + <not> + <equals arg1="success" arg2="${just_right}" /> + </not> + </condition> + </fail> + + <!-- likely to be true --> + <condition property="too_big" value="success"> + <and> + <hasfreespace partition="/" needed="1G" /> + <hasfreespace partition="/" needed="10G" /> + <hasfreespace partition="/" needed="100G" /> + <hasfreespace partition="/" needed="1T" /> + <hasfreespace partition="/" needed="10T" /> + <hasfreespace partition="/" needed="100T" /> + <hasfreespace partition="/" needed="1P" /> + </and> + </condition> + + <echo>Far too big: ${too_big} should be not be 'success'</echo> + <fail message="and test 2 failed" > + <condition> + <equals arg1="success" arg2="${too_big}" /> + </condition> + </fail> + </target> +</project> +