MCPcopy
hub / github.com/rclone/rclone / TestSyntax

Function TestSyntax

fs/sync/sync_transform_test.go:363–376  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

361}
362
363func TestSyntax(t *testing.T) {
364 ctx := context.Background()
365 err := transform.SetOptions(ctx, "prefix")
366 assert.Error(t, err) // should error as required value is missing
367
368 err = transform.SetOptions(ctx, "banana")
369 assert.Error(t, err) // should error as unrecognized option
370
371 err = transform.SetOptions(ctx, "=123")
372 assert.Error(t, err) // should error as required key is missing
373
374 err = transform.SetOptions(ctx, "prefix=123")
375 assert.NoError(t, err) // should not error
376}
377
378func TestConflicting(t *testing.T) {
379 ctx := context.Background()

Callers

nothing calls this directly

Calls 2

SetOptionsFunction · 0.92
ErrorMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…