(t *testing.T)
| 439 | } |
| 440 | |
| 441 | func TestManualTransformFile(t *testing.T) { |
| 442 | ctx := context.Background() |
| 443 | r := fstest.NewRun(t) |
| 444 | |
| 445 | r.Flocal.Features().DisableList([]string{"Copy", "Move"}) |
| 446 | r.Fremote.Features().DisableList([]string{"Copy", "Move"}) |
| 447 | |
| 448 | err := transform.SetOptions(ctx, "all,prefix=tac", "all,prefix=tic") |
| 449 | require.NoError(t, err) |
| 450 | r.WriteFile("toe/toe/toe.txt", "hello world", t1) |
| 451 | _, err = operations.MkdirModTime(ctx, r.Flocal, "empty_dir", t1) |
| 452 | require.NoError(t, err) |
| 453 | |
| 454 | r.Mkdir(ctx, r.Fremote) |
| 455 | ctx = predictDstFromLogger(ctx) |
| 456 | err = MoveDir(ctx, r.Fremote, r.Flocal, true, true) |
| 457 | testLoggerVsLsf(ctx, r.Fremote, r.Flocal, operations.GetLoggerOpt(ctx).JSON, t) |
| 458 | require.NoError(t, err) |
| 459 | |
| 460 | r.CheckLocalListing(t, []fstest.Item{}, []string{}) |
| 461 | r.CheckRemoteListing(t, []fstest.Item{fstest.NewItem("tictactoe/tictactoe/tictactoe.txt", "hello world", t1)}, []string{"tictacempty_dir", "tictactoe", "tictactoe/tictactoe"}) |
| 462 | |
| 463 | err = transform.SetOptions(ctx, "all,trimprefix=tic", "all,trimprefix=tac") |
| 464 | require.NoError(t, err) |
| 465 | err = operations.TransformFile(ctx, r.Fremote, "tictactoe/tictactoe/tictactoe.txt") |
| 466 | require.NoError(t, err) |
| 467 | r.CheckLocalListing(t, []fstest.Item{}, []string{}) |
| 468 | r.CheckRemoteListing(t, []fstest.Item{fstest.NewItem("toe/toe/toe.txt", "hello world", t1)}, []string{"tictacempty_dir", "tictactoe", "tictactoe/tictactoe", "toe", "toe/toe"}) |
| 469 | } |
| 470 | |
| 471 | func TestBase64(t *testing.T) { |
| 472 | ctx := context.Background() |
nothing calls this directly
no test coverage detected
searching dependent graphs…