forked from turesheim/eclipse.platform.releng.aggregator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-functions-test.sh
executable file
·37 lines (31 loc) · 1.26 KB
/
build-functions-test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/env bash
#*******************************************************************************
# Copyright (c) 2016 IBM Corporation and others.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# Contributors:
# David Williams - initial API and implementation
#*******************************************************************************
source build_eclipse_org.shsource
source build-functions.shsource
export buildDirectory=$( fn-build-dir "$BUILD_ROOT" "$BUILD_ID" "$STREAM" )
mkdir -p $buildDirectory
echo buildDirectory: $buildDirectory
test=1
checkNArgs 3 3
if [[ $? == 0 ]]; then echo "test $test passed"; else echo "test $test failed"; fi
test=2
checkNArgs 2 3
if [[ $? != 0 ]]; then echo "test $test passed"; else echo "test $test failed"; fi
test=3
checkNArgs 3 1 3
if [[ $? == 0 ]]; then echo "test $test passed"; else echo "test $test failed"; fi
test=4
checkNArgs 2 1 3
if [[ $? == 0 ]]; then echo "test $test passed"; else echo "test $test failed"; fi
test=5
checkNArgs 3 1 2
if [[ $? != 0 ]]; then echo "test $test passed"; else echo "test $test failed"; fi