diff options
author | jruesga <jorge@ruesga.com> | 2012-10-10 02:59:21 +0200 |
---|---|---|
committer | jruesga <jorge@ruesga.com> | 2012-10-10 02:59:21 +0200 |
commit | d94a0a07b0b7813c96057ef6083e3fbdeff7d562 (patch) | |
tree | 10f7a97eb187d858e3beff40b51386d5113661ce /tests/src | |
parent | 4e363cc84a40957a9b45d6ec3220c94d164c7953 (diff) | |
download | android_packages_apps_CMFileManager-d94a0a07b0b7813c96057ef6083e3fbdeff7d562.tar.gz android_packages_apps_CMFileManager-d94a0a07b0b7813c96057ef6083e3fbdeff7d562.tar.bz2 android_packages_apps_CMFileManager-d94a0a07b0b7813c96057ef6083e3fbdeff7d562.zip |
Better symlinks handle
Resolve symlinks with -> symbols in any of the names (link or real).
Diffstat (limited to 'tests/src')
3 files changed, 5 insertions, 6 deletions
diff --git a/tests/src/com/cyanogenmod/explorer/commands/shell/ChangeOwnerCommandTest.java b/tests/src/com/cyanogenmod/explorer/commands/shell/ChangeOwnerCommandTest.java index 6454735d..eb94b804 100644 --- a/tests/src/com/cyanogenmod/explorer/commands/shell/ChangeOwnerCommandTest.java +++ b/tests/src/com/cyanogenmod/explorer/commands/shell/ChangeOwnerCommandTest.java @@ -49,7 +49,7 @@ public class ChangeOwnerCommandTest extends AbstractConsoleTest { //Create and list the file CommandHelper.createFile(getContext(), PATH_FILE, getConsole()); FileSystemObject file = - CommandHelper.getFileInfo(getContext(), PATH_FILE, getConsole()); + CommandHelper.getFileInfo(getContext(), PATH_FILE, false, getConsole()); //Change the permissions User oldUser = file.getUser(); @@ -60,7 +60,7 @@ public class ChangeOwnerCommandTest extends AbstractConsoleTest { assertTrue("response==false", ret); //$NON-NLS-1$ //List the file again - file = CommandHelper.getFileInfo(getContext(), PATH_FILE, getConsole()); + file = CommandHelper.getFileInfo(getContext(), PATH_FILE, false, getConsole()); Group lsGroup = file.getGroup(); assertTrue("set group!=list group", //$NON-NLS-1$ newGroup.getName().compareTo(lsGroup.getName()) == 0); diff --git a/tests/src/com/cyanogenmod/explorer/commands/shell/ChangePermissionsCommandTest.java b/tests/src/com/cyanogenmod/explorer/commands/shell/ChangePermissionsCommandTest.java index 06309ecc..c9dfe435 100644 --- a/tests/src/com/cyanogenmod/explorer/commands/shell/ChangePermissionsCommandTest.java +++ b/tests/src/com/cyanogenmod/explorer/commands/shell/ChangePermissionsCommandTest.java @@ -47,7 +47,7 @@ public class ChangePermissionsCommandTest extends AbstractConsoleTest { //Create and list the file CommandHelper.createFile(getContext(), PATH_FILE, getConsole()); FileSystemObject file = - CommandHelper.getFileInfo(getContext(), PATH_FILE, getConsole()); + CommandHelper.getFileInfo(getContext(), PATH_FILE, false, getConsole()); //Change the permissions Permissions oldpermissions = file.getPermissions(); @@ -60,7 +60,7 @@ public class ChangePermissionsCommandTest extends AbstractConsoleTest { assertTrue("response==false", ret); //$NON-NLS-1$ //List the files again - file = CommandHelper.getFileInfo(getContext(), PATH_FILE, getConsole()); + file = CommandHelper.getFileInfo(getContext(), PATH_FILE, false, getConsole()); Permissions newpermissions = file.getPermissions(); String newOctalPermissions = newpermissions.toOctalString(); assertTrue("newpermissions==oldpermissions", //$NON-NLS-1$ diff --git a/tests/src/com/cyanogenmod/explorer/commands/shell/ListCommandTest.java b/tests/src/com/cyanogenmod/explorer/commands/shell/ListCommandTest.java index a94555db..79b5aa13 100644 --- a/tests/src/com/cyanogenmod/explorer/commands/shell/ListCommandTest.java +++ b/tests/src/com/cyanogenmod/explorer/commands/shell/ListCommandTest.java @@ -18,7 +18,6 @@ package com.cyanogenmod.explorer.commands.shell; import java.util.List; -import com.cyanogenmod.explorer.commands.ListExecutable.LIST_MODE; import com.cyanogenmod.explorer.model.BlockDevice; import com.cyanogenmod.explorer.model.CharacterDevice; import com.cyanogenmod.explorer.model.Directory; @@ -81,7 +80,7 @@ public class ListCommandTest extends AbstractConsoleTest { * {@link ListCommand#parse(String, String)} */ public void testParse() throws Exception { - ListCommand cmd = new ListCommand(LS_PATH, LIST_MODE.DIRECTORY, getConsole()); + ListCommand cmd = new ListCommand(LS_PATH, getConsole()); String in = "drwxr-xr-x root root 2012-05-04 01:51 acct\n" + //$NON-NLS-1$ "-rw-r--r-- root root2 229 2012-05-04 01:51 boot.txt\n" + //$NON-NLS-1$ |