1 | void testCheckinFileFlags() {↵ | | 1 | void testGetFileFlags() {↵
|
2 | String[] sTestCmdLine = {"soscmd", "-command", "CheckInFile", "-file",↵ | | 2 | String[] sTestCmdLine = {"soscmd", "-command", "GetFile", "-file",↵
|
3 | SRC_FILE, "-server", SOS_SERVER_PATH, "-name", SOS_USERNAME,↵ | | 3 | SRC_FILE, "-revision", "007", "-server", SOS_SERVER_PATH, "-name",↵
|
4 | "-password", SOS_PASSWORD, "-database", VSS_SERVER_PATH, "-project",↵ | | 4 | SOS_USERNAME, "-password", SOS_PASSWORD, "-database", VSS_SERVER_PATH,↵
|
5 | DS_VSS_PROJECT_PATH, "-verbose", "-nocompress", "-nocache",↵ | | 5 | "-project", DS_VSS_PROJECT_PATH, "-verbose", "-nocompress",↵
|
6 | "-workdir", project.getBaseDir().getAbsolutePath() + File.separator↵ | | 6 | "-nocache", "-workdir", project.getBaseDir().getAbsolutePath()↵
|
7 | + LOCAL_PATH, "-log", SRC_COMMENT↵ | | |
|
8 | };↵ | | 7 | + File.separator + LOCAL_PATH};↵
|
|
9 | // Set up a SOSCheckin task↵ | | 8 | // Set up a SOSGet task↵
|
10 | SOSCheckin sosCheckin = new SOSCheckin();↵ | | 9 | SOSGet sosGet = new SOSGet();↵
|
11 | sosCheckin.setProject(project);↵ | | 10 | sosGet.setProject(project);↵
|
12 | sosCheckin.setVssServerPath(VSS_SERVER_PATH);↵ | | 11 | sosGet.setVssServerPath(VSS_SERVER_PATH);↵
|
13 | sosCheckin.setSosServerPath(SOS_SERVER_PATH);↵ | | 12 | sosGet.setSosServerPath(SOS_SERVER_PATH);↵
|
14 | sosCheckin.setProjectPath(VSS_PROJECT_PATH);↵ | | 13 | sosGet.setProjectPath(VSS_PROJECT_PATH);↵
|
15 | sosCheckin.setFile(SRC_FILE);↵ | | 14 | sosGet.setFile(SRC_FILE);↵
|
16 | sosCheckin.setComment(SRC_COMMENT);↵ | | 15 | sos↵
|
17 | sosCheckin.setUsername(SOS_USERNAME);↵ | | 16 | Get.setUsername(SOS_USERNAME);↵
|
18 | sosCheckin.setPassword(SOS_PASSWORD);↵ | | 17 | sosGet.setPassword(SOS_PASSWORD);↵
|
19 | sosCheckin↵ | | 18 | sosGet.setVersion(VERSION);↵
|
20 | .setLocalPath(new Path(project, LOCAL_PATH));↵ | | 19 | sosGet.setLocalPath(new Path(project, LOCAL_PATH));↵
|
21 | sosCheckin.setNoCache(true);↵ | | 20 | sosGet.setNoCache(true);↵
|
22 | sosCheckin.setNoCompress(true);↵ | | 21 | sosGet.setNoCompress(true);↵
|
23 | sosCheckin.setVerbose(true);↵ | | 22 | sosGet.setVerbose(true);↵
|
24 | sosCheckin.setRecursive(true);↵ | | 23 | sosGet.setRecursive(true);↵
|
|
25 | commandline = sosCheckin.buildCmdLine();↵ | | 24 | commandline = sosGet.buildCmdLine();↵
|
|
26 | checkCommandLines(sTestCmdLine, commandline.getCommandline());↵ | | 25 | checkCommandLines(sTestCmdLine, commandline.getCommandline());↵
|
27 | }↵ | | 26 | }↵
|
|
28 | /** Test CheckInProject option flags */↵ | | 27 | /** Test SOSGetProject flags & commandline generation */↵
|
29 | public void testCheckinProjectFlags() {↵ | | 28 | public void testGetProjectFlags() {↵
|
30 | String[] sTestCmdLine = {"soscmd", "-command", "CheckInProject",↵ | | 29 | String[] sTestCmdLine = {"soscmd", "-command", "GetProject", "-recursive",↵
|
31 | "-recursive", "-server", SOS_SERVER_PATH, "-name", SOS_USERNAME,↵ | | 30 | "-label", SRC_LABEL, "-server", SOS_SERVER_PATH, "-name", SOS_USERNAME,↵
|
32 | "-password", "", "-database", VSS_SERVER_PATH, "-project",↵ | | 31 | "-password", "", "-database", VSS_SERVER_PATH, "-project",↵
|
33 | DS_VSS_PROJECT_PATH, "", "", "-soshome", SOS_HOME, "-workdir",↵ | | 32 | DS_VSS_PROJECT_PATH, "", "", "-soshome", SOS_HOME, "-workdir",↵
|
34 | project.getBaseDir().getAbsolutePath(), "-log", SRC_COMMENT,};↵ | | 33 | project.getBaseDir().getAbsolutePath()};↵
|
|
35 | // Set up a SOSCheckin task↵ | | 34 | // Set up a SOSGet task↵
|
36 | SOSCheckin sosCheckin = new SOSCheckin();↵ | | 35 | SOSGet sosGet = new SOSGet();↵
|
37 | sosCheckin.setProject(project);↵ | | 36 | sosGet.setProject(project);↵
|
38 | sosCheckin.setVssServerPath(VSS_SERVER_PATH);↵ | | 37 | sosGet.setVssServerPath(VSS_SERVER_PATH);↵
|
39 | sosCheckin.setSosServerPath(SOS_SERVER_PATH);↵ | | 38 | sosGet.setSosServerPath(SOS_SERVER_PATH);↵
|
40 | sosCheckin.setProjectPath(DS_VSS_PROJECT_PATH);↵ | | 39 | sosGet.setProjectPath(DS_VSS_PROJECT_PATH);↵
|
41 | sosCheckin. | | 40 | sosGet.
|