Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

tests: allow NULL-valued comments

This test changes the policy on what comments are valid, to allow
plain comments, not of the form KEY=VALUE (the condition reported
in Mozilla #520500).

As this commit only modifies the test suite, 'make check' is
expected to fail.
  • Loading branch information...
commit d0b3830b86302bf903a254d9fe49ac0a44104dfb 1 parent 0e01ba9
Conrad Parker authored

Showing 1 changed file with 10 additions and 12 deletions. Show diff stats Hide diff stats

  1. +10 12 src/tests/comment-test.c
22 src/tests/comment-test.c
@@ -74,18 +74,6 @@ main (int argc, char * argv[])
74 74 INFO ("Initializing FishSound for comments (encode)");
75 75 fsound = fish_sound_new (FISH_SOUND_ENCODE, &fsinfo);
76 76
77   - INFO ("+ Testing add of invalid unstructured COMMENT byname");
78   - err = fish_sound_comment_add_byname (fsound, COMMENT, NULL);
79   - if (err != FISH_SOUND_ERR_COMMENT_INVALID)
80   - FAIL ("Invalid comment not detected");
81   -
82   - INFO ("+ Testing add of invalid unstructured COMMENT from local storage");
83   - mycomment.name = COMMENT;
84   - mycomment.value = NULL;
85   - err = fish_sound_comment_add (fsound, &mycomment);
86   - if (err != FISH_SOUND_ERR_COMMENT_INVALID)
87   - FAIL ("Invalid comment not detected");
88   -
89 77 INFO ("+ Adding ARTIST1 byname");
90 78 err = fish_sound_comment_add_byname (fsound, "ARTIST", ARTIST1);
91 79 if (err < 0) FAIL ("Operation failed");
@@ -145,6 +133,16 @@ main (int argc, char * argv[])
145 133 if (strcmp (comment->value, LICENSE))
146 134 FAIL ("Incorrect LICENSE value found");
147 135
  136 + INFO ("+ Testing add of valid plain (not key=value) COMMENT byname");
  137 + err = fish_sound_comment_add_byname (fsound, COMMENT, NULL);
  138 + if (err < 0) FAIL ("Operation failed");
  139 +
  140 + INFO ("+ Testing add of valid plain (not key=value) COMMENT from local storage");
  141 + mycomment.name = COMMENT;
  142 + mycomment.value = NULL;
  143 + err = fish_sound_comment_add (fsound, &mycomment);
  144 + if (err < 0) FAIL ("Operation failed");
  145 +
148 146 INFO ("+ Adding ARTIST2 byname");
149 147 err = fish_sound_comment_add_byname (fsound, "ARTIST", ARTIST2);
150 148 if (err < 0) FAIL ("Operation failed");

0 comments on commit d0b3830

Please sign in to comment.
Something went wrong with that request. Please try again.